SilverStream
Application Server 3.5

com.sssw.shr.page
Class AgpButtonRadio

java.lang.Object
 |
 +--com.sssw.shr.page.AgpTag
       |
       +--com.sssw.shr.page.AgpControlBase
             |
             +--com.sssw.shr.page.AgpButton
                   |
                   +--com.sssw.shr.page.AgpButtonRadio
All Implemented Interfaces:
AgiJavaScriptEnhanced, AgiPageControl, AgiPageSubmitProcessor, Cloneable, Externalizable, Serializable

public class AgpButtonRadio
extends AgpButton

HTML Radio button control. Radio Buttons are used to allow the user to select a single value from a limited set of values.

Properties:
Checked Value, Data Column, Enable HTML Generation, Group, Name, State, Submit On Change
Events:
pageActionPerformed, validationFailed, validationTest, valueChanged
See Also:
Serialized Form

Fields inherited from class com.sssw.shr.page.AgpTag
UNIT_PERCENT, UNIT_PIXEL
 
Constructor Summary
AgpButtonRadio()
           
 
Method Summary
 String getCheckedValue()
          Returns the value associated with this control's "true" state, i.e., the state where the control is checked.
 String getGroupName()
          Returns the name of the group that the control belongs to.
 boolean getState()
          Returns the state of the control.
 boolean getSubmitOnChange()
          Returns whether a Submit request is sent to the server when the control's value changes.
 Object getValue()
          Returns the value associated with the checked member of this radio button's group.
 void setCheckedValue(String checkedvalue)
          Associates a value with the "checked" state of the control.
 void setGroupName(String group)
          Specifies the group name for the control.
 void setState(boolean state)
          Sets the state of the control.
 void setSubmitOnChange(boolean submit_on_change)
          Specifies whether a Submit request is sent to the server when the control's value changes.
 void setValue(Object value)
          Sets the value of the group that this radio button belongs to.
 
Methods inherited from class com.sssw.shr.page.AgpButton
addPageActionListener, removePageActionListener
 
Methods inherited from class com.sssw.shr.page.AgpControlBase
getName
 
Methods inherited from class com.sssw.shr.page.AgpTag
getBoolProperty, getEnableHTMLGeneration, getIntArrayProperty, getIntProperty, getIntPropertyUnit, getProperty, getStringArrayProperty, invalidateHTML, removeProperty, setEnableHTMLGeneration, setIntProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods implemented from interface com.sssw.shr.page.AgiJavaScriptEnhanced
generateFunction, generateRepaintScript, generateScriptInitializers, getFunctionNameForMethod, getFunctionNames, getMethodNames, getScriptObjectName, isHTMLRepaintPending, isJavaScriptRepaintPending
 
Methods implemented from interface com.sssw.shr.page.AgiPageControl
generateHTML, getPrefix, notifyPageLoaded, notifyPageRequestBegin, notifyPageRequestEnd, notifyPostValue, notifyPostValues
 
Methods implemented from interface com.sssw.shr.page.AgiPageSubmitProcessor
notifySubmit
 
Methods implemented from interface java.io.Externalizable
readExternal, writeExternal
 

Constructor Detail

AgpButtonRadio

public AgpButtonRadio()
Method Detail

getState

public boolean getState()
Returns the state of the control. It can be true or false.
Example:
 		boolean b = Radio1.getState();
 
See Also:
State property, AgpButtonRadio.setState(boolean state)

setState

public void setState(boolean state)
Sets the state of the control.
Parameters:
state - either true or false. When a radio button in a group is set to true then the other buttons in the group are set to false.
Example:
 		Radio1.setState(true);
 
See Also:
State property, AgpButtonRadio.getState()

getGroupName

public String getGroupName()
Returns the name of the group that the control belongs to.
Example:
 		String groupName = Radio1.getGroupName();
 
See Also:
Group property, AgpButtonRadio.setGroupName(String group)

setGroupName

public void setGroupName(String group)
Specifies the group name for the control.
Parameters:
group - a string containing the group name.
Example:
 		Radio1.setGroupName("Group1");
 
See Also:
Group property, AgpButtonRadio.getGroupName()

getValue

public Object getValue()
Returns the value associated with the checked member of this radio button's group. If there are three buttons named "Radio1," "Radio2" and "Radio3" in a group, and the values "1", "2" and "3" are associated with them, then getValue() on any of the three buttons will return 1, 2, or 3 depending on which button is checked.
Example:
 		Object val = Radio1.getValue();
 
See Also:
Value property, AgpButtonRadio.setValue(Object value)

setValue

public void setValue(Object value)
Sets the value of the group that this radio button belongs to. If three radio buttons "Radio1", "Radio2" and "Radio3" are in a group, associated with "1", "2" and "3" respectively, then Radio1.setValue("3") causes Radio3 to be checked, and sets the value of each button to "3". If value is not associated with any of the buttons in the group, then none of them are checked, but this value will be maintained until the user checks one of the buttons.
Parameters:
value - the new value.
Example:
 		Radio1.setValue("3");
 
See Also:
Value property, AgpButtonRadio.getValue()

getCheckedValue

public String getCheckedValue()
Returns the value associated with this control's "true" state, i.e., the state where the control is checked.
Example:
 		Object o = Radio1.getCheckedValue();
 
See Also:
AgpButtonRadio.setCheckedValue(String checkedvalue)

setCheckedValue

public void setCheckedValue(String checkedvalue)
Associates a value with the "checked" state of the control.
Parameters:
checkedvalue - the value to associate with the "checked" state of this control.
Example:
 		Radio1.setCheckedValue("On");
 
See Also:
AgpButtonRadio.getCheckedValue()

getSubmitOnChange

public boolean getSubmitOnChange()
Returns whether a Submit request is sent to the server when the control's value changes.
Example:
 		boolean b = Radio1.getSubmitOnChange();
 
See Also:
Submit On Change property, AgpButtonRadio.setSubmitOnChange(boolean submit_on_change)

setSubmitOnChange

public void setSubmitOnChange(boolean submit_on_change)
Specifies whether a Submit request is sent to the server when the control's value changes.
Parameters:
submit_on_change - true if a Submit request should be sent, otherwise false.
Example:
 		Radio1.setSubmitOnChange(true);
 
See Also:
Submit On Change property, AgpButtonRadio.getSubmitOnChange()

SilverStream
Application Server 3.5