(Quick Reference)
currencySelect
Purpose
Adds a Currency-populated
Select field to the parent container.
Examples
// Within a form
<v:form bean="${accountInstance}">
<v:currencySelect name="currency">Currency</v:currencySelect>
</v:form>// Standalone
<v:currencySelect>My Currency Select</v:currencySelect>
Description
The currencySelect tag is a special type of
field tag, where the field component
is a Vaadin
Select.
The select is auto-populated with the list of default
Currency
instances for all available
Locale
instances.
This mimics Grails's
currencySelect tag.
Body
- Contains the caption for the field
Attributes
Specific
name
(optional) The property name of the field
caption
(optional) The caption of the field. Overrides the body content.
type
(optional) The class (or its fully-qualified name) of the Vaadin Component to use for the field, or a recognised short type-name: comboBox
, listSelect
, optionGroup
, select
from
(optional) The data to use as containerDataSource. Either a comma-separated String, a collection of objects or a Vaadin Container.
itemIds
(optional) Override the default itemIds. Either a comma-separated String or a collection of objects.
itemId
(optional) Override the default itemId for each item. Either a closure that takes an Item parameter and returns an id, or the name of a property of the underlying bean.
itemCaption
(optional) Override the default itemCaption for each item. Either a closure that takes an Item parameter and returns a caption, or the name of a property of the underlying bean.
itemIcon
(optional) Display an icon for each item. Either a closure that takes an Item parameter and returns an icon, or the name of a property of the underlying bean.
The resulting value should be a Vaadin Resource, or a String path to the resource. If the path starts with /
or contains ://
, it is treated as a URL; otherwise, it is treated as a path relative to the directory of the Vaadin application's active theme.
onValueChange
(optional) Either a ValueChangeListener or a Closure that takes a ValueChangeEvent parameter.
Remember to set immediate="true"
if you want the ValueChangeEvent
to fire immediately when the user selects a new value.
General
var
(optional) Uses Grails's set tag to set the value of the specified variable to be this component.
class
(optional) The CSS class name to add to the component using the addStyleName() method
sizeUndefined
(optional) Calls setSizeUndefined() on the component. (Attribute value is ignored)
sizeFull
(optional) Calls setSizeFull() on the component. (Attribute value is ignored)
See Vaadin Select API docs for full list of allowed attributes.