Introduction

WORadioButton represents itself as an on-off switch. Radio buttons are normally grouped, since the most important aspect of their behavior is that they allow the user to select no more than one of several choices. If the user selects one button, the previously selected button (if any) becomes deselected.

Since radio buttons normally appear as a group, WORadioButton is commonly found within a WORepetition. Alternatively, you can use the WORadioButtonList element.

Usage

WORadioButton {
  value=defaultValue; 
  [selection=selectedValue;] 
  [name=fieldName;] 
  [disabled=aBoolean;] ... 
}

WORadioButton {
  checked=aBoolean; 
  [name=fieldName;] 
  [disabled=aBoolean;] ... 
}

Bindings

In a WORadioButton declaration you must supply either checked or value, but not both:they are mutually exclusive.

value

Value of this input element. If not specified, WebObjects provides a default value.

selection

If selection and value are equal when the page is generated, the radio button is selected. When the page is submitted, selection is assigned the value of the radio button.

checked

During page generation, if checked evaluates to true, the radio button appears in the selected state. During request handling, checked reflects the state the user left the radio button in: true if checked; false if not.

name

Name that identifies the radio button's group. Only one radio button at a time can be selected within a group.

disabled

If disabled evaluates to true , this element appears in the page but is not active. That is, selection does not contain the user's selection when the page is submitted.

Examples

Java methods

WOD-style

 

Inline bindings (WOOGNL)

 

Related documents

  • No labels