|
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.validation.ValidationFunction
org.pajes.html.validation.IsSelected
public class IsSelected
Creates a JavaScript validation function to validate that the user has selected a valid item from a select list.
| Constructor Summary | |
|---|---|
IsSelected()
Creates a JavaScript validation function. |
|
IsSelected(Select element,
java.lang.String displayName)
Creates a JavaScript validation function. |
|
IsSelected(Select element,
java.lang.String displayName,
int indexToIgnore)
Creates a JavaScript validation function. |
|
| Method Summary | |
|---|---|
boolean |
isMandatory()
Determines if any entries in the list are to be ignored, and therefore whether or not this field is mandatory. |
void |
setIgnoreIndex(int indexToIgnore)
Sets the item in the select list to be ignored when determining if a value has been selected from the list. |
void |
setIgnoreIndex(java.lang.Integer indexToIgnore)
Sets the item in the select list to be ignored when determining if a value has been selected from the list. |
void |
setIgnoreIndex(java.lang.String indexToIgnore)
Sets the item in the select list to be ignored when determining if a value has been selected from the list. |
ValidationFunction |
setMandatory(boolean valueIsRequired)
Sets validation to ensure the user enters a value in this field. |
java.lang.String |
toJavaScript(Browser browser)
Converts the validation function into a string to be returned to the browser. |
| Methods inherited from class org.pajes.html.validation.ValidationFunction |
|---|
clone, getDisplayName, getInputField, setDisplayName, setInputField, setMandatory, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IsSelected()
public IsSelected(Select element,
java.lang.String displayName)
element - the select list to be validated.displayName - the name of the field that will appear in any error messages.
public IsSelected(Select element,
java.lang.String displayName,
int indexToIgnore)
element - the select list to be validated.displayName - the name of the field that will appear in any error messages.indexToIgnore - a zero-indexed item in the select list to be ignored when
determining if a value has been selected from the list.| Method Detail |
|---|
public boolean isMandatory()
isMandatory in class ValidationFunctionpublic void setIgnoreIndex(int indexToIgnore)
indexToIgnore - a zero-indexed item in the select list to be ignored when
determining if a value has been selected from the list.public void setIgnoreIndex(java.lang.Integer indexToIgnore)
indexToIgnore - a zero-indexed item in the select list to be ignored when
determining if a value has been selected from the list.public void setIgnoreIndex(java.lang.String indexToIgnore)
indexToIgnore - a zero-indexed item in the select list to be ignored when
determining if a value has been selected from the list.public ValidationFunction setMandatory(boolean valueIsRequired)
setMandatory in class ValidationFunctionvalueIsRequired - true if a value is mandatory.
public java.lang.String toJavaScript(Browser browser)
toJavaScript in class ValidationFunctionbrowser - the browser to which the function will be returned.
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||