org.apache.tapestry.form
Class PropertySelection
java.lang.Object
org.apache.tapestry.spec.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.form.AbstractFormComponent
org.apache.tapestry.form.PropertySelection
- All Implemented Interfaces:
- IFormComponent, IComponent, ILocatable, ILocationHolder, IRender
public abstract class PropertySelection
- extends AbstractFormComponent
A component used to render a drop-down list of options that
the user may select.
[Component Reference]
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 Enum
.
A PropertySelection is dependent on
an IPropertySelectionModel
to provide the list of possible values.
Often, this is used to select a particular
Enum
to assign to a property; the
EnumPropertySelectionModel
class simplifies this.
- Version:
- $Id: PropertySelection.java 243791 2004-02-19 17:38:13Z hlship $
- Author:
- Howard Lewis Ship
Methods inherited from class org.apache.tapestry.AbstractComponent |
addAsset, addBody, addComponent, cleanupAfterRender, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, format, format, format, format, formatString, formatString, formatString, formatString, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString |
Methods inherited from interface org.apache.tapestry.IComponent |
addAsset, addBody, addComponent, finishLoad, getAsset, getAssets, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification |
Methods inherited from interface org.apache.tapestry.IRender |
render |
DEFAULT_SELECT_RENDERER
public static final IPropertySelectionRenderer DEFAULT_SELECT_RENDERER
- A shared instance of
SelectPropertySelectionRenderer
.
DEFAULT_RADIO_RENDERER
public static final IPropertySelectionRenderer DEFAULT_RADIO_RENDERER
- A shared instance of
RadioPropertySelectionRenderer
.
PropertySelection
public PropertySelection()
renderComponent
protected void renderComponent(IMarkupWriter writer,
IRequestCycle cycle)
- Renders the component, much of which is the responsiblity
of the
renderer
. The possible options,
thier labels, and the values to be encoded in the form are provided
by the model
.
- Specified by:
renderComponent
in class AbstractComponent
getModel
public abstract IPropertySelectionModel getModel()
getRenderer
public abstract IPropertySelectionRenderer getRenderer()
getSubmitOnChange
public abstract boolean getSubmitOnChange()
- Since:
- 2.2
getValue
public abstract Object getValue()
- Since:
- 2.2
setValue
public abstract void setValue(Object value)
- Since:
- 2.2
isDisabled
public abstract boolean isDisabled()
- Returns true if this PropertySelection's disabled parameter yields true.
The corresponding HTML control(s) should be disabled.