org.wicketopia.renderer
Class EnumChoiceRenderer<T extends Enum>
java.lang.Object
org.wicketopia.renderer.EnumChoiceRenderer<T>
- All Implemented Interfaces:
- Serializable, org.apache.wicket.markup.html.form.IChoiceRenderer<T>, org.apache.wicket.util.io.IClusterable
public class EnumChoiceRenderer<T extends Enum>
- extends Object
- implements org.apache.wicket.markup.html.form.IChoiceRenderer<T>
A choice renderer for enum values which allows internationalization of the display values. For enum value Bar from
enum class com.myco.Foo, it will look for message key com.myco.Foo.Bar.
- Since:
- 1.0
- See Also:
- Serialized Form
Constructor Summary |
EnumChoiceRenderer(org.apache.wicket.markup.html.form.DropDownChoice<T> dropDownChoice)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumChoiceRenderer
public EnumChoiceRenderer(org.apache.wicket.markup.html.form.DropDownChoice<T> dropDownChoice)
getDisplayValue
public Object getDisplayValue(T enumValue)
- Specified by:
getDisplayValue
in interface org.apache.wicket.markup.html.form.IChoiceRenderer<T extends Enum>
getIdValue
public String getIdValue(T enumValue,
int index)
- Specified by:
getIdValue
in interface org.apache.wicket.markup.html.form.IChoiceRenderer<T extends Enum>
Copyright © 2010-2013. All Rights Reserved.