Extended Token Field
ExtTokenField is a UI field displaying tokens.
The ExtTokenField add-on contains a field for managing tokens. The field is configurable in many ways. Each token is describable with one string and can execute custom actions. The field itself is no container. You must provide a ComboBox or a Button component to attach the ExtTokenField to a layout. Also, you can implement the Tokenizable interface in your bean or entity class to be able to set the fields value as a List of these objects. Feel welcome to leave your comment in the Forum or participate and provide a pull request on github. Note: ExtTokenField means Extended Token Field, because there is another add-on called TokenField. It is only named this way to avoid confusion with the other add-on. It was developed completely from scratch.
Answer to the question what the advantage to the older TokenField is
The original TokenField add-on is a server-side component. You can notice that the tokens are displayed outside of the ComboBox, because it wouldn't be possible otherwise, without using client-side extensions/components. With the other add-on, there are no keyboard controls and I think it would be hard or even impossible to add it. Furthermore, you can only add tags and remove them, with the extended add-on, you can add custom actions, e.g. a link. Finally, the TokenField add-on implements a container, which is a good thing for basic functionality but obstructive if you need to implement more complex use-cases. This is why, the extended Token Field does not implement a container itself, but leaves this completely to the developer. Ah, one more thing, you can also display a Button. This is good, if you plan to use a search window, which, when selected, adds a token to the field.
Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.
Vaadin 8 compatibility
- Apache License 2.0
- Vaadin 8.0+
- Vaadin 7.4+ in 0.1.0