com.alogient.cameleon.extension.wicket.ui.component
Class SelectChoiceList<T extends SelectChoice<?>>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
com.alogient.cameleon.extension.wicket.ui.component.SelectChoiceList<T>
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, org.apache.wicket.IClusterable, org.apache.wicket.markup.html.form.IChoiceRenderer<T>
public class SelectChoiceList<T extends SelectChoice<?>>
- extends ArrayList<T>
- implements org.apache.wicket.markup.html.form.IChoiceRenderer<T>
List of SelectChoice<?> items.
- See Also:
- Serialized Form
|
Constructor Summary |
SelectChoiceList(T... items)
Create list with initial list of items. |
|
Method Summary |
T |
addSorted(T item)
Add item to list if not there and then sort. |
Object |
getDisplayValue(T object)
Get the display value from the SelectChoice (what the user sees) |
String |
getIdValue(T object,
int index)
Get key value (what is returned from browser) |
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
SelectChoiceList
public SelectChoiceList(T... items)
- Create list with initial list of items.
- Parameters:
items - initial items
addSorted
public T addSorted(T item)
- Add item to list if not there and then sort. Returns pre-existing item (if there) or item passed in.
- Parameters:
item - to add to list
- Returns:
- item added
getDisplayValue
public Object getDisplayValue(T object)
- Get the display value from the SelectChoice (what the user sees)
- Specified by:
getDisplayValue in interface org.apache.wicket.markup.html.form.IChoiceRenderer<T extends SelectChoice<?>>
- Parameters:
object - a SelectChoice object
- Returns:
- object.getDisplay()
getIdValue
public String getIdValue(T object,
int index)
- Get key value (what is returned from browser)
- Specified by:
getIdValue in interface org.apache.wicket.markup.html.form.IChoiceRenderer<T extends SelectChoice<?>>
- Parameters:
object - a SelectChoice objectindex - not used
- Returns:
- object.getKeyAsString()
Copyright © 2011 Alogient. All Rights Reserved.