This type of selection list outputs a list of items
corresponding to the possible instances of an
org.apache.cocoon.woody.datatype.typeimpl.EnumType .
Example usage:
<wd:selection-list type="enum" class="com.example.Sex"/>
Produces the following output:
<wi:selection-list>
<wi:item value=""/>
<wi:item value="com.example.Sex.MALE">
<wi:label>
<i18n:text>com.example.Sex.MALE
</wi:label>
</wi:item>
<wi:item value="com.example.Sex.FEMALE">
<wi:label>
<i18n:text>com.example.Sex.FEMALE
</wi:label>
</wi:item>
</wi:selection-list>
If you don't want an initial null value, add a nullable="false"
attribute to the wd:selection-list element.
version: CVS $Id: EnumSelectionList.java 433543 2006-08-22 06:22:54Z crossley $ |