Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

TokenField - new component

Marc Englund
1 decade ago Feb 17, 2010 9:28pm

Hi all!

My TokenField component is nearing 1.0, so I thought it's time for some feedback - bring it on!

TokenField is technically a multiselect ComboBox that can be configured extensively. But I think it's best not to try to explain too much with words, see the screenshots, video, or online demo instead:

TokenField add-on

(crappy, crashed when I tried HD)

Online demo
Google code project, SVN

Edit: updated urls, removed old screenshots, see post below for upates.

Last updated on Aug, 23rd 2010
Marc Englund
1 decade ago Feb 19, 2010 4:08pm

Not a lot of feedback here, but TokenField still reached 1.0, with a lot of subtle and not-so-subtle improvements.
It's re-styled, CssLayout is the default and works very well, focus stays in place, and backspace/del deletes tokens - those are the main things I can think of right now.

Feature list:
- tokens can be inserted before/after input (over/under/etc depending on layout)
- backspace/delete removes last token (customizeable)
- layout can be changed
- suggestions from container
- auto add new to container
- disallow tokens not in container
- custom action on add (+ detect if token is in container)
- custom configuring of the token button (style, caption, etc)
- custom action on remove
- built in style for either Token or ComboBox input look
- built in styles for buttons, default and "emphasize"

Check out the new & improved

for an overview.

In the online demo, the black example has almost everything customized - confirm dialogs etc. Play with it! (Note: it's trying to showoff the features, not be the most usable email entry there is...)

Feedback still wanted...

There is a google code page with SVN and issue tracker

Best Regards,
Marc

Last updated on Feb, 19th 2010
Xavier Pan
1 decade ago Aug 21, 2010 3:17pm
Marc Englund
1 decade ago Aug 23, 2010 12:53pm
Peter Olah
1 decade ago Feb 21, 2011 10:54am
Nabeel Ahmad
1 decade ago Feb 25, 2011 6:49am
Johannes Peeters
1 decade ago Mar 12, 2011 11:51am
Deleted User
1 decade ago Mar 23, 2011 6:09pm
Henri Sara
1 decade ago Mar 24, 2011 7:14am
Deleted User
1 decade ago Mar 24, 2011 7:39am
Kevin Daly
1 decade ago Oct 03, 2011 3:30pm

Great component, just wondering if there is a way to disable the input box?

I'll have to look at the source code of the demo I guess

Anders Hjellvik
10 years ago Mar 13, 2012 10:16am
Anders Hjellvik
10 years ago Mar 13, 2012 10:21am
Zhongda Liu
10 years ago Mar 14, 2012 7:31am
Paul Tran
9 years ago May 02, 2012 3:01am
Adriana Krzyszczuk
9 years ago Jun 21, 2012 9:46am
Marcin Wiankowski
9 years ago Oct 11, 2012 11:13am

Really great component, and easy to use.
I only found it confusing when i wanted to get selected tokens. I used getTokenIds() instead of getValue().
I think it would be really usefull to add getTokens() method to TokenField class.

Petr Prikryl
9 years ago Oct 17, 2012 1:28pm
Pablo León
9 years ago Nov 21, 2012 3:35pm
Ell Dubya
9 years ago Dec 08, 2012 9:01pm
Ell Dubya
9 years ago Dec 08, 2012 9:22pm
Renier Roth
9 years ago Dec 14, 2012 11:19am
Oliver Zhou
9 years ago Feb 22, 2013 3:53am
Marc Poy
9 years ago Mar 25, 2013 2:43pm
David A
8 years ago Apr 22, 2013 11:13pm
Alexandr Mikhalchenko
8 years ago Jun 15, 2013 11:27am
Brett Sutton
8 years ago Jul 28, 2013 11:24am
Henri Sara
8 years ago Jul 29, 2013 6:17am
Alexandr Mikhalchenko
8 years ago Jul 30, 2013 2:56pm
Brett Sutton
8 years ago Aug 01, 2013 12:56pm
Brett Sutton
8 years ago Aug 01, 2013 1:28pm
Henri Sara
8 years ago Aug 02, 2013 6:19am
Moritz Christian
8 years ago Aug 13, 2013 8:53am
Marita Klein
8 years ago Sep 18, 2013 7:36am
Prakash Varigonda
8 years ago Dec 05, 2013 7:34pm
Perit Bezek
7 years ago Sep 13, 2014 8:46am
Klaus Pittig
5 years ago May 18, 2016 10:41am

After a long time:
Is there a new version and another source repository planned of the TokenField?

Like several others I exported it from the obsolete code.google platform to secure the source code:
https://github.com/jforge/tokenfield

I use this component in several projects and for now I've just added 1 further issue due to a known problem with the ComboBox: 
https://github.com/jforge/tokenfield/issues/16

Everyone can contribute there and I will apply pull requests ASAP.

But I would appreciate a tokenfield source repository owned by the original author, if he is interested.
 

rounak kumar
5 years ago Aug 09, 2016 11:59am
Octavian NITA
5 years ago Nov 16, 2016 10:26am
Martin Letenay
5 years ago Feb 24, 2017 12:36pm

If you're impatient and eager to switch to Vaadin 8 like me, I've created a pull request with Vaadin 8 adaptations here: https://github.com/jforge/tokenfield/pull/17

I've used the jforge's github clone of origin google-code repository, the changes were pretty straightforward.
So if you need the Vaadin8 compatible version, you can build your own ...