org.apache.tapestry.corelib.components
Class Radio

java.lang.Object
  extended by org.apache.tapestry.corelib.components.Radio
All Implemented Interfaces:
ClientElement, Field

public class Radio
extends Object
implements Field

A radio button (i.e., <input type="radio">). Radio buttons must operate within a RadioContainer (normally, the RadioGroup component).

If the value parameter is not bound, then the default value is a property of the container component whose name matches the Radio component's id.


Constructor Summary
Radio()
           
 
Method Summary
 String getClientId()
          Returns a unique id for the element.
 String getControlName()
          Returns the control name provided by the containing RadioContainer.
 String getLabel()
          Returns a user presentable (localized) label for the field, which may be used inside <label> elements on the client, and inside client or server-side validation error messages.
 boolean isDisabled()
          Returns true if this component has been expressly disabled (via its disabled parameter), or if the container has been disabled.
 boolean isRequired()
          Returns false; the RadioComponent component does not support declarative field validation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Radio

public Radio()
Method Detail

getControlName

public String getControlName()
Returns the control name provided by the containing RadioContainer.

Specified by:
getControlName in interface Field
See Also:
FormSupport.allocateControlName(String)

getLabel

public String getLabel()
Description copied from interface: Field
Returns a user presentable (localized) label for the field, which may be used inside <label> elements on the client, and inside client or server-side validation error messages.

Specified by:
getLabel in interface Field
Returns:
the label
See Also:
Label

isDisabled

public boolean isDisabled()
Returns true if this component has been expressly disabled (via its disabled parameter), or if the container has been disabled.

Specified by:
isDisabled in interface Field

getClientId

public String getClientId()
Description copied from interface: ClientElement
Returns a unique id for the element. This value will be unique for any given rendering of a page. This value is intended for use as the id attribute of the client-side element, and will be used with any DHTML/Ajax related JavaScript.

Specified by:
getClientId in interface ClientElement

isRequired

public boolean isRequired()
Returns false; the RadioComponent component does not support declarative field validation.

Specified by:
isRequired in interface Field
Returns:
true if a non-blank value is required for the field


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.