public abstract class PropertySelection extends AbstractFormComponent implements ValidatableField
Earlier versions of PropertySelection (through release 2.2) were more flexible, they included a renderer property that controlled how the selection was rendered. Ultimately, this proved of little value and this portion of functionality was deprecated in 2.3 and will be removed in 2.3.
Typically, the values available to be selected are defined using an
org.apache.commons.lang.enum.Enum. A PropertySelection is dependent on an
IPropertySelectionModel to provide the list of possible values.
Often, this is used to select a particular org.apache.commons.lang.enum.Enum to assign to
a property; the EnumPropertySelectionModel class simplifies this.
Often, a drop-down list will contain an initial option that serves both as a label and to represent
that nothing is selected. This can behavior can easily be achieved by decorating an existing
IPropertySelectionModel with a LabeledPropertySelectionModel.
As of 4.0, this component can be validated.
| Constructor and Description |
|---|
PropertySelection() |
| Modifier and Type | Method and Description |
|---|---|
abstract IPropertySelectionModel |
getModel() |
abstract boolean |
getSubmitOnChange() |
abstract ValidatableFieldSupport |
getValidatableFieldSupport()
Injected.
|
abstract java.lang.Object |
getValue() |
boolean |
isRequired()
Returns false.
|
protected void |
renderFormComponent(IMarkupWriter writer,
IRequestCycle cycle) |
protected void |
rewindFormComponent(IMarkupWriter writer,
IRequestCycle cycle) |
abstract void |
setValue(java.lang.Object value) |
getAlwaysRenderBodyOnRewind, getCanTakeFocus, getForm, getIdParameter, getName, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderIdAttribute, setClientId, setForm, setName, setNameaddAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetValidatorsgetClientId, getDisplayName, getForm, getName, isDisabled, setNameaddAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setPropertypublic PropertySelection()
protected void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
public abstract IPropertySelectionModel getModel()
public abstract boolean getSubmitOnChange()
public abstract java.lang.Object getValue()
public abstract void setValue(java.lang.Object value)
public abstract ValidatableFieldSupport getValidatableFieldSupport()
public boolean isRequired()
AbstractFormComponentisRequired in interface IFormComponentisRequired in class AbstractFormComponentAbstractFormComponent.isRequired()