org.apache.tapestry.form
Class Select

java.lang.Object
  extended by org.apache.tapestry.spec.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.form.AbstractFormComponent
              extended by org.apache.tapestry.form.Select
All Implemented Interfaces:
IFormComponent, IComponent, ILocatable, ILocationHolder, IRender

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

Otherwise, this component is very similar to RadioGroup.

Version:
$Id: Select.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
Select()
           
 
Method Summary
protected  void cleanupAfterRender(IRequestCycle cycle)
          Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle) after the component renders, to clear any parameters back to null (or 0, or false, or whatever the correct default is).
static Select get(IRequestCycle cycle)
           
 String getNextOptionId()
           
abstract  boolean isDisabled()
          Returns true if the component is disabled.
abstract  boolean isMultiple()
           
 boolean isRewinding()
           
 boolean isSelected(String value)
           
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          Renders the <option> element, or responds when the form containing the element is submitted (by checking IForm.isRewinding().
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
getDisplayName, getForm, getForm, getName, setForm, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, 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 class org.apache.tapestry.spec.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.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
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Constructor Detail

Select

public Select()
Method Detail

get

public static Select get(IRequestCycle cycle)

isDisabled

public abstract boolean isDisabled()
Description copied from interface: IFormComponent
Returns true if the component is disabled. This is important when the containing form is submitted, since disabled parameters do not update their bindings.


isMultiple

public abstract boolean isMultiple()

isRewinding

public boolean isRewinding()

getNextOptionId

public String getNextOptionId()

isSelected

public boolean isSelected(String value)

renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)
Renders the <option> element, or responds when the form containing the element is submitted (by checking IForm.isRewinding().

Specified by:
renderComponent in class AbstractComponent

cleanupAfterRender

protected void cleanupAfterRender(IRequestCycle cycle)
Description copied from class: AbstractComponent
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle) after the component renders, to clear any parameters back to null (or 0, or false, or whatever the correct default is). Primarily, this is used to ensure that the component doesn't hold onto any objects that could otherwise be garbage collected.

Subclasses may override this implementation, but must also invoke it.

Overrides:
cleanupAfterRender in class AbstractComponent