If you specify the onClick event for the radio group, a user's click invokes a function. The same function is invoked in response to a click of any button; typically, the function determines which button was clicked and then responds to the selection.
In Internet Explorer, your code cannot preselect a radio button before displaying the radio group.
import egl.ui.rui.Event; import com.ibm.egl.rui.widgets.RadioGroup; import com.ibm.egl.rui.widgets.TextField; Handler OneRadioButton Type RUIHandler { initialUI = [myTextField, myRadioGroup] } myTextField TextField { text = "Monday?" }; myRadioGroup RadioGroup { groupName = "abc", options = ["Monday", "Tuesday"], onClick ::= myRadioHandler }; Function myRadioHandler(e Event in) if (myRadioGroup.selected == "Tuesday") myTextField.text = "Tuesday!"; else myTextField.text = "Monday!"; end end end
For information about other supported properties and functions, see "Widget properties and functions."
import com.ibm.egl.rui.widgets.RadioGroup;