public abstract class MultiplePropertySelection extends org.apache.tapestry.form.AbstractFormComponent implements org.apache.tapestry.form.ValidatableField
org.apache.commons.lang.enum.Enum. A
MultiplePropertySelection is dependent on an {link IPropertySelectionModel} to provide the list
of possible values.
Often, this is used to select one or more org.apache.commons.lang.enum.Enumto assign to
a property; the org.apache.tapestry.form.EnumPropertySelectionModelclass simplifies
this.
The Palettecomponent is more powerful, but requires
client-side JavaScript and is not fully cross-browser compatible.
| Parameter | Type | Direction | Required | Default | Description |
| selectedList | java.util.List | in-out | yes | The property to set. During rendering, this property is read, and sets the default value of the options in the select. When the form is submitted, list is cleared, then has each selected option added to it. | |
| renderer | IMultiplePropertySelectionRenderer |
in | no | shared instance of CheckBoxMultiplePropertySelectionRenderer |
Defines the object used to render this component. The default renders a table of checkboxes. |
| model | IPropertySelectionModel |
in | yes | The model provides a list of possible labels, and matches those labels against possible values that can be assigned back to the property. | |
| disabled | boolean | in | no | false | Controls whether the <select> is active or not. A disabled PropertySelection does not
update its value parameter.
Corresponds to the |
Informal parameters are not allowed.
As of 4.0, this component can be validated.
| Modifier and Type | Field and Description |
|---|---|
static IMultiplePropertySelectionRenderer |
DEFAULT_CHECKBOX_RENDERER
A shared instance of
CheckBoxMultiplePropertySelectionRenderer. |
| Constructor and Description |
|---|
MultiplePropertySelection() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finishLoad() |
abstract org.apache.tapestry.form.IPropertySelectionModel |
getModel() |
abstract IMultiplePropertySelectionRenderer |
getRenderer() |
abstract java.util.Collection |
getSelectedList() |
abstract org.apache.tapestry.form.ValidatableFieldSupport |
getValidatableFieldSupport() |
boolean |
isRequired() |
protected void |
renderFormComponent(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle) |
protected void |
rewindFormComponent(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle) |
abstract void |
setRenderer(IMultiplePropertySelectionRenderer renderer) |
abstract void |
setSelectedList(java.util.Collection selectedList) |
getAlwaysRenderBodyOnRewind, getCanTakeFocus, getForm, getIdParameter, getName, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderIdAttribute, setClientId, setForm, setName, setNameaddAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, 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, waitgetClientId, 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 static final IMultiplePropertySelectionRenderer DEFAULT_CHECKBOX_RENDERER
CheckBoxMultiplePropertySelectionRenderer.public MultiplePropertySelection()
public abstract java.util.Collection getSelectedList()
public abstract void setSelectedList(java.util.Collection selectedList)
protected void finishLoad()
finishLoad in class org.apache.tapestry.AbstractComponentprotected void renderFormComponent(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle)
renderFormComponent in class org.apache.tapestry.form.AbstractFormComponentprotected void rewindFormComponent(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle)
rewindFormComponent in class org.apache.tapestry.form.AbstractFormComponentorg.apache.tapestry.form.AbstractRequirableField#rewindFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)public abstract org.apache.tapestry.form.IPropertySelectionModel getModel()
public abstract IMultiplePropertySelectionRenderer getRenderer()
public abstract void setRenderer(IMultiplePropertySelectionRenderer renderer)
public abstract org.apache.tapestry.form.ValidatableFieldSupport getValidatableFieldSupport()
public boolean isRequired()
isRequired in interface org.apache.tapestry.form.IFormComponentisRequired in class org.apache.tapestry.form.AbstractFormComponentAbstractFormComponent.isRequired()