PAJES 3.0.21

org.pajes.html
Class SelectJavaScriptList

java.lang.Object
  extended by org.pajes.html.Tag
      extended by org.pajes.html.Input
          extended by org.pajes.html.Select
              extended by org.pajes.html.SelectJavaScriptList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HTML, InputMandatoryValidation, InputValidation

public class SelectJavaScriptList
extends Select

Generates the <SELECT>, and the associated <OPTION> tags to create list boxes and drop-down lists are generated from a client-side JavaScript script.

See Also:
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
protected SelectJavaScriptList()
          Default constructor for sub-classing does nothing.
  SelectJavaScriptList(Form form, java.lang.String name, boolean allowMultipleItemsToBeSelected, int rowsToDisplay, boolean isRequired, Script script)
          Create a drop down list or select box.
  SelectJavaScriptList(Form form, java.lang.String name, boolean allowMultipleItemsToBeSelected, int rowsToDisplay, Script script)
          Create a drop down list or select box.
  SelectJavaScriptList(Form form, java.lang.String name, boolean allowMultipleItemsToBeSelected, Script script)
          Create a drop down list or select box.
  SelectJavaScriptList(Form form, java.lang.String name, int rowsToDisplay, boolean allowMultipleItemsToBeSelected, boolean isRequired, int indexToIgnore, Script script)
          Create a drop down list or select box.
  SelectJavaScriptList(Form form, java.lang.String name, int rowsToDisplay, Script script)
          Create a drop down list or select box.
  SelectJavaScriptList(Form form, java.lang.String name, Script script)
          Create a drop down list or select box.
 
Method Summary
protected  java.util.Iterator<? extends OptionItem> getOptions()
          Returns an Iterator of Option instances.
protected  Script getScript()
          Returns the JavaScript function that is the source of the select list options.
protected  SelectJavaScriptList setScript(Script script)
          Sets a JavaScript function as the source of the select list options.
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, getNull, getRowsToDisplay, getSearchField, isMandatory, setGenerateNull, setGenerateNull, setIndexToIgnoreInMandatoryCheck, setMandatory, setMultipleSelectAllowed, setRowsToDisplay, write, writeSearchField
 
Methods inherited from class org.pajes.html.Input
addClientValidation, addContent, clone, getClientValidation, getClientValidation, getDOMReference, getFieldNameForErrorMessage, getForm, getInstance, getLabel, getName, getOnBlurHandler, getOnChangeHandler, getOnFocusHandler, getOnSelectHandler, getReadOnlyStyleSheetClass, getTabIndex, getType, getValue, isChangeFlagEnabled, isDisabled, isReadOnly, isRequiringValidation, logNoFormWarning, removeClientValidation, removeClientValidation, removeClientValidation, removeMandatoryClientValidation, setChanged, setChangedFlag, setContent, setDisabled, setFieldNameInErrorMessage, setFieldNameInErrorMessage, setForm, setId, setLabel, setName, setOnBlurHandler, setOnBlurValidation, setOnChangeHandler, setOnClickHandler, setOnFocusHandler, setOnSelectHandler, setReadOnly, setReadOnlyStyleSheetClass, setTabIndex, setTabIndex, setTabIndex, setValue
 
Methods inherited from class org.pajes.html.Tag
addAttribute, addAttributes, addAttributes, clearAttribute, clearAttributes, destroy, getAttribute, getAttributes, getAttributeSet, getContainer, getContent, getDocument, getId, getOnClickHandler, getOnDBLClickHandler, getOnKeyDownHandler, getOnKeyPressHandler, getOnKeyUpHandler, getOnMouseDownHandler, getOnMouseOutHandler, getOnMouseOverHandler, getOnMouseUpHandler, getParent, getStyle, getStyleSheetClass, getTagName, getTitle, getWritePermission, hasAttribute, init, initAttributes, isChildOf, isChildOf, isWritable, isWritable, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContainer, setContent, setOnDBLClickHandler, setOnKeyDownHandler, setOnKeyPressHandler, setOnKeyUpHandler, setOnMouseDownHandler, setOnMouseOutHandler, setOnMouseOverHandler, setOnMouseUpHandler, setParent, setStyle, setStyleSheetClass, setTagName, setTitle, setWritable, setWriteAttributes, setWriteEndTag, setWritelnAfter, setWritelnAfterContent, setWritelnBefore, setWritelnBeforeContent, setWritePermission, toString
 
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

SelectJavaScriptList

public SelectJavaScriptList(Form form,
                            java.lang.String name,
                            boolean allowMultipleItemsToBeSelected,
                            int rowsToDisplay,
                            boolean isRequired,
                            Script script)
Create a drop down list or select box.

Parameters:
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 - to true is multiple items are selectable
rowsToDisplay - the number of rows that are shown when the user clicks on the select list
isRequired - to true if an item must be selected from the list
script - the Script from which the options for this list will be determined at load time.

SelectJavaScriptList

public SelectJavaScriptList(Form form,
                            java.lang.String name,
                            boolean allowMultipleItemsToBeSelected,
                            int rowsToDisplay,
                            Script script)
Create a drop down list or select box.

Parameters:
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 - to true is multiple items are selectable
rowsToDisplay - the number of rows that are shown when the user clicks on the select list
script - the Script from which the options for this list will be determined at load time.

SelectJavaScriptList

public SelectJavaScriptList(Form form,
                            java.lang.String name,
                            boolean allowMultipleItemsToBeSelected,
                            Script script)
Create a drop down list or select box.

Parameters:
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 - to true if multiple items are selectable
script - the Script from which the options for this list will be determined at load time.

SelectJavaScriptList

public SelectJavaScriptList(Form form,
                            java.lang.String name,
                            int rowsToDisplay,
                            boolean allowMultipleItemsToBeSelected,
                            boolean isRequired,
                            int indexToIgnore,
                            Script script)
Create a drop down list or select box.

Parameters:
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
allowMultipleItemsToBeSelected - to true is multiple items are selectable
isRequired - to true if an item must be selected from the list
indexToIgnore - a zero-indexed item in the select list to be ignored when determining if a value has been selected from the list.
script - the Script from which the options for this list will be determined at load time.

SelectJavaScriptList

public SelectJavaScriptList(Form form,
                            java.lang.String name,
                            int rowsToDisplay,
                            Script script)
Create a drop down list or select box.

Parameters:
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
script - the Script from which the options for this list will be determined at load time.

SelectJavaScriptList

public SelectJavaScriptList(Form form,
                            java.lang.String name,
                            Script script)
Create a drop down list or select box.

Parameters:
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.
script - the Script from which the options for this list will be determined at load time.

SelectJavaScriptList

protected SelectJavaScriptList()
Default constructor for sub-classing does nothing.

Method Detail

getOptions

protected java.util.Iterator<? extends OptionItem> getOptions()
Returns an Iterator of Option instances.

Specified by:
getOptions in class Select
Returns:
an empty Iterator, as this list is populated by the client browser.

getScript

protected Script getScript()
Returns the JavaScript function that is the source of the select list options.

Returns:
the JavaScript function that is the source of the select list options.

setScript

protected SelectJavaScriptList setScript(Script script)
Sets a JavaScript function as the source of the select list options.

Parameters:
script - the Script object containg the JavaScript code.
Returns:
the modified SelectJavaScriptList object.

writeContent

protected void writeContent(Browser browser)
                     throws java.io.IOException
Called to write the content between the start and end tags.

Overrides:
writeContent in class Select
Parameters:
browser - the browser to which the results are to be output.
Throws:
java.io.IOException - if an I/O error occurs writing to the browser.
See Also:
Tag.setWriteEndTag(boolean)

PAJES 3.0.21

Copyright © 1998-2007 Viridian Pty Limited. All Rights Reserved.