Rich UI TextField
A Rich UI textField widget defines a text box containing a single line of text.
Here is example code:
package myPkg;
import egl.ui.rui.Event;
import com.ibm.egl.rui.widgets.RadioGroup;
import com.ibm.egl.rui.widgets.TextField;
handler MyHandler type RUIHandler{initialUI =[myTextField, myRadioGroup]}
myTextField TextField{text = "On Monday?"};
myRadioGroup RadioGroup{groupName = "abc",
options =["Monday", "Tuesday"],
onClick ::= myRadio};
function myRadio(e Event in)
if(myRadioGroup.selected == "Tuesday")
myTextField.text = "No, on Monday!";
else
myTextField.text = "No, on Tuesday!";
end
end
endThe following properties are supported.
- text, which holds a string for display in the text field.
- readOnly, which holds a Boolean that indicates whether the text field is protected from user input.
The following function is supported:
- select causes the widget to receive focus and, on most browsers, selects the text. The function has no parameters.
Other supported properties and functions are described in “Widget properties and functions.”
Use of this widget requires the following statement:
import com.ibm.egl.rui.widgets.TextField;