org.apache.tapestry.form
Class Select

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.form.AbstractFormComponent
              extended by org.apache.tapestry.form.Select
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IFormComponent, ValidatableField, IComponent, IRender

public abstract class Select
extends AbstractFormComponent
implements ValidatableField

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 PropertySelectioncomponent. [ Component Reference ]

Otherwise, this component is very similar to RadioGroup.

As of 4.0, this component can be validated.

Author:
Howard Lewis Ship, Paul Ferraro

Constructor Summary
Select()
           
 
Method Summary
protected  void cleanupAfterRender(IRequestCycle cycle)
          Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle)after the component renders.
static Select get(IRequestCycle cycle)
           
 java.lang.String getNextOptionId()
           
abstract  ValidatableFieldSupport getValidatableFieldSupport()
          Injected.
abstract  boolean isMultiple()
           
 boolean isRequired()
          Returns false.
 boolean isRewinding()
           
 boolean isSelected(java.lang.String value)
           
protected  void prepareForRender(IRequestCycle cycle)
          Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle)to prepare the component to render.
protected  void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
           
protected  void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
           
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
getAlwaysRenderBodyOnRewind, getCanTakeFocus, getForm, getIdParameter, getName, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderIdAttribute, setClientId, setForm, setName, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, 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, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.form.ValidatableField
getValidators
 
Methods inherited from interface org.apache.tapestry.form.IFormComponent
getClientId, getDisplayName, getForm, getName, isDisabled, setName
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, 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, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

Select

public Select()
Method Detail

get

public static Select get(IRequestCycle cycle)

isMultiple

public abstract boolean isMultiple()

isRewinding

public boolean isRewinding()

getNextOptionId

public java.lang.String getNextOptionId()

isSelected

public boolean isSelected(java.lang.String value)

prepareForRender

protected void prepareForRender(IRequestCycle cycle)
Description copied from class: AbstractComponent
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle)to prepare the component to render. This implementation sets JavaBeans properties from matching bound parameters. This implementation does nothing.

Overrides:
prepareForRender in class AbstractComponent
See Also:
AbstractComponent.prepareForRender(org.apache.tapestry.IRequestCycle)

cleanupAfterRender

protected void cleanupAfterRender(IRequestCycle cycle)
Description copied from class: AbstractComponent
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle)after the component renders. This implementation does nothing.

Overrides:
cleanupAfterRender in class AbstractComponent
See Also:
AbstractComponent.cleanupAfterRender(org.apache.tapestry.IRequestCycle)

renderFormComponent

protected void renderFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Specified by:
renderFormComponent in class AbstractFormComponent
See Also:
AbstractFormComponent.renderFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

rewindFormComponent

protected void rewindFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Specified by:
rewindFormComponent in class AbstractFormComponent
See Also:
AbstractFormComponent.rewindFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

getValidatableFieldSupport

public abstract ValidatableFieldSupport getValidatableFieldSupport()
Injected.


isRequired

public boolean isRequired()
Description copied from class: AbstractFormComponent
Returns false. Subclasses that might be required must override this method. Typically, this involves checking against the component's validators.

Specified by:
isRequired in interface IFormComponent
Overrides:
isRequired in class AbstractFormComponent
See Also:
AbstractFormComponent.isRequired()