com.primix.tapestry.form
Class Radio

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

public class Radio
extends AbstractComponent

Implements a component that manages an HTML <input type=radio> form element. Such a component must be wrapped (possibly indirectly) inside a RadioGroup component.

Radio and RadioGroup are generally not used (except for very special cases). Instead, a PropertySelection component is used.
Property Type Read / Write Required Default Description
value Object R no Boolean.TRUE The value is used to determine if the radio button is initially selected (when rendering) and is the value assigned to the selected parameter when the form is submitted, if the HTML radio button is selected.
disabled boolean R no false If true, then the Radio is disabled. It will write a disabled attribute into its tag when rendering, and will not update its selected binding.

A binding may also be disabled if its containing RadioGroup is disabled.

Informal parameters are allowed, but may not contain a body.

Version:
$Id: Radio.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
Radio()
           
 
Method Summary
 IBinding getDisabledBinding()
           
 java.lang.Object getValue()
           
 IBinding getValueBinding()
           
 void render(IResponseWriter writer, IRequestCycle cycle)
          Renders the form element, or responds when the form containing the element is submitted (by checking Form.isRewinding().
 void setDisabledBinding(IBinding value)
           
 void setValueBinding(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

Radio

public Radio()
Method Detail

getDisabledBinding

public IBinding getDisabledBinding()

setDisabledBinding

public void setDisabledBinding(IBinding value)

getValueBinding

public IBinding getValueBinding()

setValueBinding

public void setValueBinding(IBinding value)

getValue

public java.lang.Object getValue()

render

public void render(IResponseWriter writer,
                   IRequestCycle cycle)
            throws RequestCycleException
Renders the form element, or responds when the form containing the element is submitted (by checking Form.isRewinding().

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