|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.form.LabeledWebMarkupContainer
org.apache.wicket.markup.html.form.FormComponent<T>
org.apache.wicket.markup.html.form.AbstractChoice<T,E>
T - The model object typeE - class of a single element in the choices listpublic abstract class AbstractChoice<T,E>
Abstract base class for all choice (html select) options.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.markup.html.form.FormComponent |
|---|
FormComponent.AbstractVisitor, FormComponent.IVisitor |
| Nested classes/interfaces inherited from class org.apache.wicket.Component |
|---|
Component.ComponentModelChange, Component.EnabledChange, Component.VisibilityChange |
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.markup.html.form.FormComponent |
|---|
FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, VALUE_SEPARATOR |
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Constructor Summary | |
|---|---|
AbstractChoice(java.lang.String id)
Constructor. |
|
AbstractChoice(java.lang.String id,
IModel<? extends java.util.List<? extends E>> choices)
Constructor. |
|
AbstractChoice(java.lang.String id,
IModel<? extends java.util.List<? extends E>> choices,
IChoiceRenderer<E> renderer)
Constructor. |
|
AbstractChoice(java.lang.String id,
IModel<T> model,
IModel<? extends java.util.List<? extends E>> choices)
Constructor. |
|
AbstractChoice(java.lang.String id,
IModel<T> model,
IModel<? extends java.util.List<? extends E>> choices,
IChoiceRenderer<E> renderer)
Constructor. |
|
AbstractChoice(java.lang.String id,
IModel<T> model,
java.util.List<? extends E> choices)
Constructor. |
|
AbstractChoice(java.lang.String id,
IModel<T> model,
java.util.List<? extends E> choices,
IChoiceRenderer<E> renderer)
Constructor. |
|
AbstractChoice(java.lang.String id,
java.util.List<? extends E> choices)
Constructor. |
|
AbstractChoice(java.lang.String id,
java.util.List<? extends E> choices,
IChoiceRenderer<E> renderer)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
appendOptionHtml(AppendingStringBuffer buffer,
E choice,
int index,
java.lang.String selected)
Generates and appends html for a single choice into the provided buffer |
protected void |
detachModel()
Detaches the model for this component if it is detachable. |
protected java.lang.CharSequence |
escapeOptionHtml(java.lang.String displayValue)
Method to override if you want special escaping of the options html. |
IChoiceRenderer<E> |
getChoiceRenderer()
|
java.util.List<? extends E> |
getChoices()
|
protected java.lang.CharSequence |
getDefaultChoice(java.lang.Object selected)
|
protected boolean |
isDisabled(E object,
int index,
java.lang.String selected)
Gets whether the given value is disabled. |
protected abstract boolean |
isSelected(E object,
int index,
java.lang.String selected)
Gets whether the given value represents the current selection. |
protected boolean |
localizeDisplayValues()
Override this method if you want to localize the display values of the generated options. |
protected void |
onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
Handle the container's body. |
AbstractChoice<T,E> |
setChoiceRenderer(IChoiceRenderer<E> renderer)
Set the choice renderer to be used. |
AbstractChoice<T,E> |
setChoices(IModel<? extends java.util.List<? extends E>> choices)
Sets the list of choices |
AbstractChoice<T,E> |
setChoices(java.util.List<E> choices)
Sets the list of choices. |
protected boolean |
supportsPersistence()
|
| Methods inherited from class org.apache.wicket.markup.html.form.FormComponent |
|---|
add, add, checkRequired, clearInput, convertInput, convertValue, error, getConvertedInput, getForm, getInput, getInputAsArray, getInputName, getModel, getModelObject, getModelValue, getRawInput, getType, getValidatorKeyPrefix, getValidators, getValue, hasRawInput, inputAsInt, inputAsInt, inputAsIntArray, inputChanged, internalOnModelChanged, invalid, isInputNullable, isMultiPart, isPersistent, isRequired, isValid, newValidatable, onComponentTag, onDetach, onDisabled, onInvalid, onValid, processChildren, processInput, setConvertedInput, setLabel, setModel, setModelObject, setModelValue, setModelValue, setPersistent, setRequired, setType, shouldTrimInput, trim, updateModel, valid, validate, validateRequired, validateValidators, visitComponentsPostOrder, visitFormComponentsPostOrder |
| Methods inherited from class org.apache.wicket.markup.html.form.LabeledWebMarkupContainer |
|---|
getLabel, setLabelInternal |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getMarkupType, getWebPage, getWebRequest |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractChoice(java.lang.String id)
id - See ComponentComponent.Component(String)
public AbstractChoice(java.lang.String id,
java.util.List<? extends E> choices)
id - See Componentchoices - The collection of choices in the dropdownComponent.Component(String)
public AbstractChoice(java.lang.String id,
java.util.List<? extends E> choices,
IChoiceRenderer<E> renderer)
id - See Componentrenderer - The rendering enginechoices - The collection of choices in the dropdownComponent.Component(String)
public AbstractChoice(java.lang.String id,
IModel<T> model,
java.util.List<? extends E> choices)
id - See Componentmodel - See Componentchoices - The collection of choices in the dropdownComponent.Component(String, IModel)
public AbstractChoice(java.lang.String id,
IModel<T> model,
java.util.List<? extends E> choices,
IChoiceRenderer<E> renderer)
id - See Componentmodel - See Componentchoices - The drop down choicesrenderer - The rendering engineComponent.Component(String, IModel)
public AbstractChoice(java.lang.String id,
IModel<? extends java.util.List<? extends E>> choices)
id - See Componentchoices - The collection of choices in the dropdownComponent.Component(String)
public AbstractChoice(java.lang.String id,
IModel<? extends java.util.List<? extends E>> choices,
IChoiceRenderer<E> renderer)
id - See Componentrenderer - The rendering enginechoices - The collection of choices in the dropdownComponent.Component(String)
public AbstractChoice(java.lang.String id,
IModel<T> model,
IModel<? extends java.util.List<? extends E>> choices)
id - See Componentmodel - See Componentchoices - The collection of choices in the dropdownComponent.Component(String, IModel)
public AbstractChoice(java.lang.String id,
IModel<T> model,
IModel<? extends java.util.List<? extends E>> choices,
IChoiceRenderer<E> renderer)
id - See Componentmodel - See Componentrenderer - The rendering enginechoices - The drop down choicesComponent.Component(String, IModel)| Method Detail |
|---|
public java.util.List<? extends E> getChoices()
public final AbstractChoice<T,E> setChoices(IModel<? extends java.util.List<? extends E>> choices)
choices - model representing the list of choices
public final AbstractChoice<T,E> setChoices(java.util.List<E> choices)
choices - the list of choices
public final IChoiceRenderer<E> getChoiceRenderer()
public final AbstractChoice<T,E> setChoiceRenderer(IChoiceRenderer<E> renderer)
renderer -
protected void detachModel()
Component
detachModel in class ComponentComponent.detachModel()protected java.lang.CharSequence getDefaultChoice(java.lang.Object selected)
selected - The object that's currently selected
protected abstract boolean isSelected(E object,
int index,
java.lang.String selected)
object - The object to checkindex - The index in the choices collection this object is in.selected - The currently selected string value
protected boolean isDisabled(E object,
int index,
java.lang.String selected)
object - The object to checkindex - The index in the choices collection this object is in.selected - The currently selected string value
protected void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
onComponentTagBody in class MarkupContainermarkupStream - The markup streamopenTag - The open tag for the bodyComponent.onComponentTagBody(MarkupStream, ComponentTag)
protected void appendOptionHtml(AppendingStringBuffer buffer,
E choice,
int index,
java.lang.String selected)
buffer - Appending string buffer that will have the generated html appendedchoice - Choice objectindex - The index of this optionselected - The currently selected string valueprotected java.lang.CharSequence escapeOptionHtml(java.lang.String displayValue)
displayValue -
protected boolean supportsPersistence()
supportsPersistence in class FormComponent<T>FormComponent.supportsPersistence()protected boolean localizeDisplayValues()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||