Download

Get Loom

InputSelect and InputRadio

Select and Radio components share the way of specifying the list of options:

<!-- 

Enumeration values are guessed automatically

-->
<l:inputSelect name="mortgage.status" />

<!-- 

Additional options may be added by hand 

-->
<l:inputSelect name="country">
   <option value="es" />
   <option value="en" />
   <option value="other" label="Other countries" translateLabel="false"/>
</l:inputSelect>

<!-- 

action.getCountries() returns a Collection of Option or
any class with attributes "id" and "name" 

-->
<l:inputSelect name="country" options="${action.countries}"/>

<!-- 

action.getProvinces() returns a Collection of any class with 
attributes "key" and "firstName" 

-->
<l:inputSelect name="province" options="${action.provinces}" 
   keyProperty="key" labelProperty"firstName" 
   translateLabels="false" />