com.primix.tapestry.form
Class Select
java.lang.Object
|
+--com.primix.tapestry.AbstractComponent
|
+--com.primix.tapestry.form.AbstractFormComponent
|
+--com.primix.tapestry.form.Select
- All Implemented Interfaces:
- IComponent, IFormComponent, IRender
- public class Select
- extends AbstractFormComponent
Implements a component that manages an HTML <select> form element.
The most common situation, using a <select> to set a specific
property of some object, is best handled using a PropertySelection
component.
Otherwise, this component is very similar to RadioGroup
.
Parameter |
Type |
Read / Write |
Required |
Default |
Description |
multiple |
boolean |
R |
no |
false |
If true, the component allows multiple selection. |
disabled |
boolean |
R |
no |
false |
Controls whether the select is active or not.
Corresponds to the disabled HTML attribute. |
Informal parameters are allowed.
- Version:
- $Id: Select.java,v 1.9 2001/08/28 20:33:41 hship Exp $
- Author:
- Howard Ship
Methods inherited from class com.primix.tapestry.AbstractComponent |
addAsset, addComponent, addWrapped, cleanupAfterRender, cleanupComponent, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getPage, getSpecification, prepareForRender, renderWrapped, reset, setBinding, setContainer, setId, setPage, setSpecification, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.primix.tapestry.IComponent |
addAsset, addComponent, addWrapped, finishLoad, getAsset, getAssets, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getPage, getSpecification, renderWrapped, setBinding, setContainer, setId, setPage, setSpecification |
Select
public Select()
getName
public java.lang.String getName()
- Description copied from interface:
IFormComponent
- Returns the name of the component, which is automatically generated
during renderring.
This value is set inside the component's render method and is
not cleared. If the component is inside a Foreach
, the
value returned is the most recent name generated for the component.
This property is made available to facilitate writing JavaScript that
allows components (in the client web browser) to interact.
In practice, a Script
component
works with the Body
component to get the
JavaScript code inserted and referenced.
- Overrides:
getName
in class AbstractFormComponent
get
public static Select get(IRequestCycle cycle)
getDisabledBinding
public IBinding getDisabledBinding()
getMultipleBinding
public IBinding getMultipleBinding()
isDisabled
public boolean isDisabled()
isRewinding
public boolean isRewinding()
getNextOptionId
public java.lang.String getNextOptionId()
isSelected
public boolean isSelected(java.lang.String value)
render
public void render(IResponseWriter writer,
IRequestCycle cycle)
throws RequestCycleException
- Renders the <option> element, or responds when the form containing the element
is submitted (by checking
Form.isRewinding()
.
setDisabledBinding
public void setDisabledBinding(IBinding value)
setMultipleBinding
public void setMultipleBinding(IBinding value)