org.apache.tapestry.form
Class RadioGroup

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

public abstract class RadioGroup
extends AbstractFormComponent

A special type of form component that is used to contain Radiocomponents. The Radio and Radiogroup components work together to update a property of some other object, much like a more flexible version of a PropertySelection. [ Component Reference ]

Author:
Howard Lewis Ship

Constructor Summary
RadioGroup()
           
 
Method Summary
static RadioGroup get(IRequestCycle cycle)
           
 int getNextOptionId()
           
abstract  boolean isDisabled()
          Used by Radiocomponents wrapped by this RadioGroup to see if the group as a whole is disabled.
 boolean isRewinding()
           
 boolean isSelected(int option)
          Used by Radiocomponents when rewinding to see if their value was submitted.
 boolean isSelection(java.lang.Object value)
          Returns true if the value is equal to the current selection for the group.
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          Doesn't actual render an HTML element as there is no direct equivalent for an HTML element.
 void updateSelection(java.lang.Object value)
          Invoked by the Radiowhich is selected to update the property bound to the selected parameter.
 
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, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, 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.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, 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

RadioGroup

public RadioGroup()
Method Detail

get

public static RadioGroup get(IRequestCycle cycle)

getNextOptionId

public int getNextOptionId()

isDisabled

public abstract boolean isDisabled()
Used by Radiocomponents wrapped by this RadioGroup to see if the group as a whole is disabled.


isRewinding

public boolean isRewinding()

isSelection

public boolean isSelection(java.lang.Object value)
Returns true if the value is equal to the current selection for the group. This is invoked by a Radioduring rendering to determine if it should be marked 'checked'.


updateSelection

public void updateSelection(java.lang.Object value)
Invoked by the Radiowhich is selected to update the property bound to the selected parameter.


isSelected

public boolean isSelected(int option)
Used by Radiocomponents when rewinding to see if their value was submitted.


renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)
Doesn't actual render an HTML element as there is no direct equivalent for an HTML element. A RadioGroup component exists to organize the Radiocomponents it wraps (directly or indirectly). A Radiocan finds its RadioGroupas a IRequestCycleattribute.

Specified by:
renderComponent in class AbstractComponent