|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pajes.html.Tag
org.pajes.html.Input
org.pajes.html.InputRadioButtonSet
This class builds a set of HTML radio button tags.
NOTE: JavaScript handlers, read-only flags or style sheet id's defined on the set always over-ride any settings on the individual radio buttons! For example:
InputRadioButtonSet yn = new InputRadioButtonSet(form, "radio", false);
yn.add("y", true, "Yes", true);
yn.add("n", false, "No", true);
// The following WILL NOT WORK! You can't set the handler of an individual radio item.
yn.get("y").setOnClickHandler("alert('Yes selected!');");
// Do it this way instead
yn.setOnClickHandler("if (this.value == 'y') { alert('Yes selected!') };");
| Field Summary |
| Fields inherited from class org.pajes.html.Input |
TYPE_ATTRIBUTE |
| Fields inherited from class org.pajes.html.Tag |
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
InputRadioButtonSet(Form form,
java.lang.String name,
boolean vertical)
Creates a set of radio buttons. |
|
| Method Summary | |
InputRadioButtonSet |
add(InputRadio radio)
Add a radio button to the set. |
InputRadioButtonSet |
add(java.lang.String value,
boolean isChecked)
Add a radio button to the set. |
InputRadioButtonSet |
add(java.lang.String value,
boolean isChecked,
Span displayText,
boolean textOnLeft)
Add a radio button to the set. |
InputRadioButtonSet |
add(java.lang.String value,
boolean isChecked,
java.lang.String displayText,
boolean textOnLeft)
Add a radio button to the set. |
InputRadioButtonSet |
add(java.lang.String value,
boolean isChecked,
Text displayText,
boolean textOnLeft)
Add a radio button to the set. |
InputRadio |
get(java.lang.String value)
Returns the radio button instance that has the specified value. |
Input |
setValue(java.lang.String value)
Sets the radio button with the specified value to be checked. |
void |
write(Browser browser)
Writes the <input type="radio"> tags to the browser. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public InputRadioButtonSet(Form form,
java.lang.String name,
boolean vertical)
form - the form on which this input field will appear. Note that
the element must still be added to the form - this reference is
used by the getDOMReference() method to determine the fully
qualified element name.name - the name to apply to the radio buttons.vertical - true if the buttons are to be displayed vertically, or
false if they are to be displayed horizontally.| Method Detail |
public Input setValue(java.lang.String value)
setValue in class Inputvalue - the value returned if the radio button is selected.
public InputRadioButtonSet add(InputRadio radio)
radio - the radio button instance.
public InputRadioButtonSet add(java.lang.String value,
boolean isChecked)
value - the value returned if the radio button is selected.isChecked - Set to true if you want the radio button to be
initially selected.
public InputRadioButtonSet add(java.lang.String value,
boolean isChecked,
java.lang.String displayText,
boolean textOnLeft)
value - the value returned if the radio button is selected.isChecked - Set to true if you want the radio button to be
initially selected.displayText - the text to be displayed next to the radio button.textOnLeft - true if the text is to be displayed on the left of the
radio button, or false if it is to be displayed on the right.
public InputRadioButtonSet add(java.lang.String value,
boolean isChecked,
Text displayText,
boolean textOnLeft)
value - the value returned if the radio button is selected.isChecked - Set to true if you want the radio button to be
initially selected.displayText - the text to be displayed next to the radio button.textOnLeft - true if the text is to be displayed on the left of the
radio button, or false if it is to be displayed on the right.
public InputRadioButtonSet add(java.lang.String value,
boolean isChecked,
Span displayText,
boolean textOnLeft)
value - the value returned if the radio button is selected.isChecked - Set to true if you want the radio button to be
initially selected.displayText - the text to be displayed next to the radio button.textOnLeft - true if the text is to be displayed on the left of the
radio button, or false if it is to be displayed on the right.
public InputRadio get(java.lang.String value)
value - the value returned if the radio button is selected.
public void write(Browser browser)
throws java.io.IOException
write in interface HTMLwrite in class Inputbrowser - the browser to which the results are to be output.
java.io.IOException - if an I/O error occurs writing to the browser.
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||