|
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
org.pajes.html.SelectList
Generates the <SELECT> and associated <OPTION> tags to create list boxes and drop-down lists.
Option,
OptionGroup,
Serialized Form| Field Summary |
| Fields inherited from class org.pajes.html.Select |
NULL_ENTRY |
| 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 | |
SelectList()
Default constructor creates an empty select list. |
|
SelectList(Form form,
java.lang.String name)
Create a drop down list or select box. |
|
SelectList(Form form,
java.lang.String name,
boolean allowMultipleItemsToBeSelected)
Create a drop down list or select box. |
|
SelectList(Form form,
java.lang.String name,
boolean allowMultipleItemsToBeSelected,
int rowsToDisplay)
Create a drop down list or select box. |
|
SelectList(Form form,
java.lang.String name,
boolean allowMultipleItemsToBeSelected,
int rowsToDisplay,
boolean isRequired)
Create a drop down list or select box. |
|
SelectList(Form form,
java.lang.String name,
int rowsToDisplay)
Create a drop down list or select box. |
|
SelectList(Form form,
java.lang.String name,
int rowsToDisplay,
boolean allowMultipleItemsToBeSelected,
boolean isRequired,
int indexToIgnore)
Create a drop down list or select box. |
|
| Method Summary | |
SelectList |
add(java.util.List options)
Adds options from a List. |
SelectList |
add(OptionItem option)
Adds an option item to the list. |
SelectList |
add(Option option,
java.lang.String label)
Adds an option item to an OptionGroup. |
SelectList |
add(java.lang.String option)
Adds an option to the drop down list. |
SelectList |
add(java.lang.String[] options)
Adds options from an array of Strings. |
SelectList |
add(java.lang.String[][] options)
Adds options from an array of Strings. |
SelectList |
add(java.lang.String option,
java.lang.String value)
Adds an option to the drop down list. |
SelectList |
add(java.lang.String option,
java.lang.String value,
boolean selected)
Adds an option to the drop down list. |
Select |
clearDefaultValues()
Clears the default selected values for the list. |
java.lang.Object |
clone()
Allows a tag to be cloned. |
HTML |
get(int position)
Gets the HTML object from the specified position in the container. |
protected Option |
getNull()
Returns the default null entry, or null if no null entry is to be generated for this list. |
java.util.Iterator |
getOptions()
Returns an Iterator of OptionItem instances. |
java.lang.String[] |
getSelectedOptions()
Returns an array of the currently selected options. |
void |
remove()
Removes all the options currently stored in the select list. |
Traversable |
set(HTML htmlObject,
int position)
Sets an HTML object at a specified position in the container. |
Input |
setValue(java.lang.String value)
Sets the default value to be initially selected. |
Traversable |
setWritable(boolean visible,
boolean cascade)
Determines if this object and its contents should be returned to the browser. |
int |
size()
Returns the number of HTML objects in the current container. |
protected void |
writeContent(Browser browser)
Called to write the content between the start and end tags. |
| Methods inherited from class org.pajes.html.Select |
getMultipleSelectAllowed, getRowsToDisplay, getSearchField, isMandatory, setGenerateNull, setGenerateNull, setIndexToIgnoreInMandatoryCheck, setMandatory, setMultipleSelectAllowed, setRowsToDisplay, write, writeSearchField |
| 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 |
public SelectList()
public SelectList(Form form,
java.lang.String name)
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 of the list box.
public SelectList(Form form,
java.lang.String name,
boolean allowMultipleItemsToBeSelected)
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 of the list box.allowMultipleItemsToBeSelected - true if multiple items are
selectable
public SelectList(Form form,
java.lang.String name,
int rowsToDisplay)
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 of the list box.rowsToDisplay - the number of rows that are shown when the user
clicks on the select list
public SelectList(Form form,
java.lang.String name,
boolean allowMultipleItemsToBeSelected,
int rowsToDisplay)
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 of the list box.allowMultipleItemsToBeSelected - true is multiple items are
selectablerowsToDisplay - the number of rows that are shown when the user
clicks on the select list
public SelectList(Form form,
java.lang.String name,
boolean allowMultipleItemsToBeSelected,
int rowsToDisplay,
boolean isRequired)
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 of the list box.allowMultipleItemsToBeSelected - true is multiple items are
selectablerowsToDisplay - the number of rows that are shown when the user
clicks on the select listisRequired - true if an item must be selected from the list
public SelectList(Form form,
java.lang.String name,
int rowsToDisplay,
boolean allowMultipleItemsToBeSelected,
boolean isRequired,
int indexToIgnore)
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 of the list box.rowsToDisplay - the number of rows that are shown when the user
clicks on the select listallowMultipleItemsToBeSelected - true is multiple items are
selectableisRequired - true if an item must be selected from the listindexToIgnore - 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 java.util.Iterator getOptions()
getOptions in class Selectpublic java.lang.String[] getSelectedOptions()
public Input setValue(java.lang.String value)
setValue in class Inputvalue - the value to set as the default.
public Traversable setWritable(boolean visible,
boolean cascade)
setWritable in interface Traversablevisible - true if this element should be returned to
the browser, or false if it should not.cascade - true if any contained elements should be
returned to the browser, or false if they should
not. Note that this option does not affect any tags that would
not normally return their contents if they themselves are not
writable (e.g. Table tags).
Tag.setWritable(boolean)public SelectList add(java.util.List options)
OptionItem instance.
String (in which case the String will be added as both
the option description and the value).
String[] (in which case it is assumed to be a two element
array, where element 0 is the option description and element 1 is the
option value).
options - the List object containing the options.
public SelectList add(java.lang.String option)
option - - The Text to display in the select list - the Text will
be returned as the value when selected
public SelectList add(java.lang.String option,
java.lang.String value)
option - - The Text to display in the select listvalue - - the value to be returned when the item is selected
public SelectList add(java.lang.String option,
java.lang.String value,
boolean selected)
option - the Text to display in the select listvalue - the value to be returned when the item is selectedselected - set to true if this is the default value
public SelectList add(java.lang.String[] options)
options - the array containing the String options.
public SelectList add(java.lang.String[][] options)
options - the array containing the String options.
public SelectList add(Option option,
java.lang.String label)
OptionGroup. If the specified OptionGroup does not exist, it will be created.
option - - The Option to be added.label - - The label of the OptionGroup to which the option should
be added.
public SelectList add(OptionItem option)
option - - The Option or OptionGroup
public Select clearDefaultValues()
setValue(java.lang.String)public java.lang.Object clone()
clone in interface HTMLclone in class Inputpublic HTML get(int position)
get in interface Traversableposition - the position to get the html object
public void remove()
public Traversable set(HTML htmlObject,
int position)
set in interface TraversablehtmlObject - the Object to add.position - the position at which to place the html object.
public int size()
size in interface Traversableprotected Option getNull()
Select
getNull in class SelectSelect.getNull()
protected void writeContent(Browser browser)
throws java.io.IOException
writeContent in class Selectbrowser - 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 | |||||||||