|
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.Select
Abstract class to generate the <SELECT> and associated <OPTION> tags to create list boxes and drop-down lists.
Option,
OptionGroup,
Serialized Form| Field Summary | |
static java.lang.String |
NULL_ENTRY
The value returned by a select list item if it represents a null. |
| 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 | |
Select()
Creates a select list. |
|
| Method Summary | |
boolean |
getMultipleSelectAllowed()
Gets whether multiple items may be selected simultaneously. |
protected Option |
getNull()
Returns the default null entry, or null if no null entry is to be generated for this list. |
protected abstract java.util.Iterator |
getOptions()
Returns an Iterator of Option instances. |
int |
getRowsToDisplay()
Gets the number of rows to display when the user clicks on the list. |
InputString |
getSearchField()
Returns an field that can be used to search a long
select list for matching entries. |
boolean |
isMandatory()
Determines if this field is mandatory |
Select |
setGenerateNull(int size)
Determines whether a null entry should be generated for this list. |
Select |
setGenerateNull(java.lang.String text,
int size)
Determines whether a null entry should be generated for this list. |
Select |
setIndexToIgnoreInMandatoryCheck(int indexToIgnore)
Sets the zero-based index of an element to be ignored when performing the isMandatory check. |
Input |
setMandatory(boolean valueIsRequired)
Sets validation to ensure the user selects an item in the list |
Select |
setMultipleSelectAllowed(boolean allowMultipleItemsToBeSelected)
Sets whether multiple items may be selected simultaneously. |
Select |
setRowsToDisplay(int rowsToDisplay)
Sets the number of rows to display when the user clicks on the list. |
void |
write(Browser browser)
Writes the <select> tags and contained <OPTION> tags to the browser. |
protected void |
writeContent(Browser browser)
Called by the write(org.pajes.servlet.Browser) method to write the content between the
start and end tags. |
protected void |
writeSearchField(Browser browser)
Should be called by sub-class write methods to display the search field. |
| 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 |
| Field Detail |
public static final java.lang.String NULL_ENTRY
| Constructor Detail |
public Select()
| Method Detail |
public Select setGenerateNull(int size)
size - the number of spaces to display as the null entry. If size
is less than 1, no null entry will be generated
public Select setGenerateNull(java.lang.String text,
int size)
text - the text to display on the null entry.size - the length to which the text will be padded with spaces. If
size is less than 1, no null entry will be generated
public Select setIndexToIgnoreInMandatoryCheck(int indexToIgnore)
indexToIgnore - the zero-indexed item in the select list to be
ignored when determining if a value has been selected from the
list.
TagException - if the index to ignore is less than zero.public Input setMandatory(boolean valueIsRequired)
setMandatory in interface InputMandatoryValidationvalueIsRequired - true if a value is mandatory.
public boolean isMandatory()
isMandatory in interface InputMandatoryValidationpublic Select setMultipleSelectAllowed(boolean allowMultipleItemsToBeSelected)
allowMultipleItemsToBeSelected - true allows multiple items to be
selected.
public boolean getMultipleSelectAllowed()
public Select setRowsToDisplay(int rowsToDisplay)
rowsToDisplay - number of rows shown when the user clicks on the
select list.
public int getRowsToDisplay()
public InputString getSearchField()
field that can be used to search a long
select list for matching entries. As keystrokes are entered into the
field, the next matching entry in the list that starts with the
characters entered will be automatically selected.
The default setting for the field is setWritable(false).
Therefore, to use the field, it should be retrieved using this method
and its setWritable set to true. Other
parameters such as the input length may/should also be set.
Care should be taken with field positioning. If visible, the input field
will be placed on the page, followed by a <BR> tag,
and then the select list. Therefore, placing the list in a table cell is highly recommended.
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 IO exception occursprotected Option getNull()
protected abstract java.util.Iterator getOptions()
protected void writeContent(Browser browser)
throws java.io.IOException
write(org.pajes.servlet.Browser) method to write the content between the
start and end tags.
writeContent in class Tagbrowser - 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)
protected void writeSearchField(Browser browser)
throws java.io.IOException
browser - the browser to which the results are to be output.
java.io.IOException - if an IO exception occursgetSearchField()
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||