com.primix.tapestry.form
Class Option

java.lang.Object
  |
  +--com.primix.tapestry.AbstractComponent
        |
        +--com.primix.tapestry.form.Option
All Implemented Interfaces:
IComponent, IRender

public class Option
extends AbstractComponent

Implements a component that manages an HTML <option> form element. Such a component must be wrapped (possibly indirectly) inside a Select component.
Parameter Type Read / Write Required Default Description
selected java.lang.Boolean R / W yes   Used to indicate whether the given option is selected.
label java.lang.String R no   A string which represents the option that may be selected. This is optional; any text that follows the <option> tag is considered the label, but this saves the designed from including one more Insert component.

Allows informal parameters, but may not contain a body.

Version:
$Id: Option.java,v 1.7 2001/08/24 21:38:47 hship Exp $
Author:
Howard Ship

Fields inherited from class com.primix.tapestry.AbstractComponent
id, page, specification, wrapped, wrappedCount
 
Constructor Summary
Option()
           
 
Method Summary
 IBinding getLabelBinding()
           
 IBinding getSelectedBinding()
           
 void render(IResponseWriter writer, IRequestCycle cycle)
          Renders the <option> element, or responds when the form containing the element is submitted (by checking Form.isRewinding().
 void setLabelBinding(IBinding value)
           
 void setSelectedBinding(IBinding value)
           
 
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
 

Constructor Detail

Option

public Option()
Method Detail

getLabelBinding

public IBinding getLabelBinding()

getSelectedBinding

public IBinding getSelectedBinding()

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().
attribute value
value from IRequestCycle.getNextActionId()
selected from selected property
other from extra bindings

If the label property is set, it is inserted after the <option> tag.


setLabelBinding

public void setLabelBinding(IBinding value)

setSelectedBinding

public void setSelectedBinding(IBinding value)