org.apache.cocoon.woody.datatype
Class EnumSelectionList
java.lang.Object
org.apache.cocoon.woody.datatype.EnumSelectionList
- All Implemented Interfaces:
- SelectionList
public class EnumSelectionList
- extends Object
- implements SelectionList
This type of selection list outputs a list of items
corresponding to the possible instances of an 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.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
I18N_NS
public static final String I18N_NS
- See Also:
- Constant Field Values
I18N_PREFIX_COLON
public static final String I18N_PREFIX_COLON
- See Also:
- Constant Field Values
TEXT_EL
public static final String TEXT_EL
- See Also:
- Constant Field Values
EnumSelectionList
public EnumSelectionList(String className,
Datatype datatype,
boolean nullable)
throws ClassNotFoundException
- Parameters:
className
- datatype
-
- Throws:
ClassNotFoundException
getDatatype
public Datatype getDatatype()
- Specified by:
getDatatype
in interface SelectionList
generateSaxFragment
public void generateSaxFragment(ContentHandler contentHandler,
Locale locale)
throws SAXException
- Specified by:
generateSaxFragment
in interface SelectionList
- Throws:
SAXException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.