org.apache.wicket.markup.html.form
Interface IChoiceRenderer

All Superinterfaces:
IClusterable, java.io.Serializable
All Known Implementing Classes:
ChoiceRenderer

public interface IChoiceRenderer
extends IClusterable

Renders one choice. Separates the 'id' values used for internal representation from 'display values' which are the values shown to the user of components that use this renderer.

Author:
jcompagner

Method Summary
 java.lang.Object getDisplayValue(java.lang.Object object)
          Get the value for displaying to an end user.
 java.lang.String getIdValue(java.lang.Object object, int index)
          This method is called to get the id value of an object (used as the value attribute of a choice element) The id can be extracted from the object like a primary key, or if the list is stable you could just return a toString of the index.
 

Method Detail

getDisplayValue

java.lang.Object getDisplayValue(java.lang.Object object)
Get the value for displaying to an end user.

Parameters:
object - the actual object
Returns:
the value meant for displaying to an end user

getIdValue

java.lang.String getIdValue(java.lang.Object object,
                            int index)
This method is called to get the id value of an object (used as the value attribute of a choice element) The id can be extracted from the object like a primary key, or if the list is stable you could just return a toString of the index.

Parameters:
object - The object for which the id should be generated
index - The index of the object in the choices list.
Returns:
String


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.