|
PAJES 3.0.21 | ||||||||
| 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.InputChecked
public abstract class InputChecked
Super-class of Input elements that have only an on/off state.
| 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 | |
|---|---|
protected |
InputChecked(InputField source,
java.lang.String type)
Creates a check input element from another input field. |
protected |
InputChecked(java.lang.String type,
Form form,
java.lang.String name,
java.lang.String value,
boolean isChecked)
Creates an input field that has an on/off state. |
| Method Summary | |
|---|---|
boolean |
isChecked()
Determines if the checkbox has been checked or not. |
boolean |
isMandatory()
Determines if mandatory validation has been applied to this element. |
Input |
setChecked(boolean isChecked)
Sets the initial value of the check box. |
Input |
setCheckedValue(java.lang.String value)
Sets the the value returned if the check box is selected. |
InputChecked |
setDisplayText(HTML displayText)
Sets the display text associated with the checked item. |
InputChecked |
setDisplayText(java.lang.String displayText)
Sets the display text associated with the check box. |
InputChecked |
setDisplayTextOnLeft(boolean onLeft)
Sets the location of the display text. |
Input |
setMandatory(boolean valueIsRequired)
Sets validation to ensure the user selects an element with the same name as this. |
Input |
setMandatory(boolean valueIsRequired,
java.lang.String fieldName)
Sets validation to ensure the user selects an element with the same name as this. |
Input |
setValue(java.lang.String value)
Checks the provided value against that initially defined for this element, and calls setChecked() with true if the
values match, or false if they do not. |
void |
write(Browser browser)
Writes the <input> tag to the browser. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.pajes.html.InputValidation |
|---|
getClientValidation, getDOMReference, getName, isRequiringValidation, setOnBlurValidation |
| Constructor Detail |
|---|
protected InputChecked(InputField source,
java.lang.String type)
source - the input field from which this input field will be created.type - the type attribute of the <input> tag.
protected InputChecked(java.lang.String type,
Form form,
java.lang.String name,
java.lang.String value,
boolean isChecked)
type - the type attribute of the <input> tag.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 input object, so that it may be
manipulated using client-side JavaScript.value - the value returned if the checkbox is selectedisChecked - Set to true if you want the check box to have a check in it.| Method Detail |
|---|
public boolean isChecked()
public boolean isMandatory()
InputChecked
object with the same name, this method
will return false but will still be included in the
validation.
public Input setChecked(boolean isChecked)
isChecked - true if the box is to be checked on initial display.
public Input setCheckedValue(java.lang.String value)
value - the value returned if the check box is selected.
public InputChecked setDisplayText(HTML displayText)
displayText - the text to be displayed.
public InputChecked setDisplayText(java.lang.String displayText)
displayText - the text to be displayed.
public InputChecked setDisplayTextOnLeft(boolean onLeft)
onLeft - true if the text is to be displayed on the left of the check
box, or false if it is to be displayed on the right
public Input setMandatory(boolean valueIsRequired)
name as this. For performance reasons, only
one element in the group with the same name
should have mandatory validation applied.
valueIsRequired - true if a value is mandatory.
public Input setMandatory(boolean valueIsRequired,
java.lang.String fieldName)
name as this. For performance reasons, only
one element in the group with the same name
should have mandatory validation applied.
valueIsRequired - true if a value is mandatory.fieldName - is the name of the element to display in the error message.
public Input setValue(java.lang.String value)
setChecked() with true if the
values match, or false if they do not.
setValue in class Inputvalue - the value to assign.
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.Tag.setWriteEndTag(boolean),
Tag.writeContent(org.pajes.servlet.Browser)
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||