| |
|
| java.lang.Object com.jcorporate.expresso.core.controller.ControllerElement com.jcorporate.expresso.core.controller.Input
Input | public class Input extends ControllerElement implements Cloneable,Cacheable(Code) | | An Input object is one of the three types of objects generated by a
Controller when it transitions from one state to another. The other two
are Actions and Outputs.
An Input is a request for information from the user. It may or may
not have a default value, a list of valid values, and other
attributes - any or all of which can be used by the user interface,
which can be a JSP, Servlet, application, or even an applet.
Recognized Types:
The following types are recognized by the expresso framework and
automatically rendered: You may add your own types or ignore them
if you are doing your own page rendering.
checkbox: Renders as a checkbox. If multivalued=true then will render
the options as a list of checkboxes.
radio: If multivalued, will render all options as a list of radio buttons
checkbox-vertical: Only relevent for multivalues, renders the checkbox
style as vertical
|
ATTRIBUTE_CHECKBOX | final public static String ATTRIBUTE_CHECKBOX(Code) | | The Input is intended to be rendered as a check box
|
ATTRIBUTE_CHECKBOX_VERTICAL | final public static String ATTRIBUTE_CHECKBOX_VERTICAL(Code) | | The Input is intended to be rendered as a vertically aligned checkbox
|
ATTRIBUTE_CSS_STYLE | final public static String ATTRIBUTE_CSS_STYLE(Code) | | Defines the CSS style to use when rendering the input.
|
ATTRIBUTE_DROPDOWN | final public static String ATTRIBUTE_DROPDOWN(Code) | | The Input is intended to be rendered as a drop down box
|
ATTRIBUTE_FILE | final public static String ATTRIBUTE_FILE(Code) | | The Input is indended to be a file upload box.
|
ATTRIBUTE_HIDDEN | final public static String ATTRIBUTE_HIDDEN(Code) | | The Input is intended to be rendered as a Hidden Field
|
ATTRIBUTE_LISTBOX | final public static String ATTRIBUTE_LISTBOX(Code) | | The Input is intended to be rendered as a List Box
|
ATTRIBUTE_MULTIVALUED | final public static String ATTRIBUTE_MULTIVALUED(Code) | | Means that the Input will be some sort of multi-valued field and
has valid values associated with it.
|
ATTRIBUTE_ORIGINAL_VALUE | final public static String ATTRIBUTE_ORIGINAL_VALUE(Code) | | Attribute that contains the original value of this input. Usually set
for read only inputs.
|
ATTRIBUTE_PASSWORD | final public static String ATTRIBUTE_PASSWORD(Code) | | Attribute for password boxes.
|
ATTRIBUTE_RADIO | final public static String ATTRIBUTE_RADIO(Code) | | The Input is intended to be rendered as a Radio Button
|
ATTRIBUTE_RADIO_VERTICAL | final public static String ATTRIBUTE_RADIO_VERTICAL(Code) | | The Input is intended to be rendered as a Vertically Aligned Radio Button
|
ATTRIBUTE_READONLY | final public static String ATTRIBUTE_READONLY(Code) | | The Input is intended to be read only.
|
ATTRIBUTE_TEXTAREA | final public static String ATTRIBUTE_TEXTAREA(Code) | | The Input is intended to be rendered as a Text Area
|
ATTRIBUTE_TEXTLINE | final public static String ATTRIBUTE_TEXTLINE(Code) | | text input, single line (as opposed to text area)
|
ATTRIBUTE_TYPE | final public static String ATTRIBUTE_TYPE(Code) | | Attribute defines the HTML Type that will be used with the Input
|
SELECTED | final public static String SELECTED(Code) | | constant for JSTL attribute for 'selectness' of a given input
|
Input | public Input()(Code) | | Default constructor
|
Input | public Input(String newName)(Code) | | Convenience constructor - to make a new Input object
with a specific name
Parameters: newName - the new input name |
Input | public Input(String newName, String newLabel)(Code) | | Constructor that sets the name and the label of the input
Parameters: newName - the name of the Input Parameters: newLabel - the label of the input |
addDefaultValue | public void addDefaultValue(String newValue)(Code) | | supply another default value for this
Input object; appropriate for multiple selection items
Parameters: newValue - The new default value for this Input item See Also: Input.setDefaultValue(String) See Also: for single selection |
addValidValue | public synchronized void addValidValue(String value, String descrip)(Code) | | Add a valid value to the Input's dropdown
Parameters: value - the 'key' part of the valid value Parameters: descrip - the description part of the valid value. |
getContent | public String getContent()(Code) | | (Convenience for JSTL access, to be parallel with Output)
Return a single default value supplied by the Controller for this
Input object; returns the 0th item in list (we expect this function
to be used only for single selection items)
A String to be used as the default value for this Input; empty string if no default has been set See Also: Input.getDefaultValueList See Also: for multiple selections |
getDefaultValue | public String getDefaultValue()(Code) | | Return a single default value supplied by the Controller for this
Input object; returns the 0th item in list (we expect this function
to be used only for single selection items)
A String to be used as the default value for this Input; empty string if no default has been set See Also: Input.getDefaultValueList See Also: for multiple selections |
getDefaultValueList | public ArrayList getDefaultValueList()(Code) | | Return a list of default values supplied by the Controller for this
Input object; appropriate for multiple selection items
A list of strings to be used as the default values for this Input; never null, though list can be empty See Also: Input.getDefaultValue See Also: for single selections |
getKey | public String getKey()(Code) | | Retrieve the key for the input.
java.lang.String |
getLookup | public String getLookup()(Code) | | Returns the class name of a database object that can be used to
look up valid values for this Input item, if there is one.
java.lang.String the class name of the lookup database object |
getMaxLength | public int getMaxLength()(Code) | | Return the maximum recommended length of the value for this
Input object.
The maximum number of characters that should be suppliedas a value to this Input object |
getMultiple | public String getMultiple()(Code) | | Retrieve the multi select status.
java.lang.String |
getSelectedDisplay | public String getSelectedDisplay()(Code) | | get the display string associated with the currently-selected (default).
useful for a JSTL reuse of Input for output purposes, when
the default value is an ID, while its partner ValidValue pairing is the display string.
the display string associated with the currently-selected (default) value, or empty string if none found--never null |
getValidValues | public Vector getValidValues()(Code) | | Return the list of Valid Values that are allowed for this
Input item.
A Vector of value/description pairs that enumeratethe valid values for this Input item. The user is expectedto select one of these values, but the presentation of thelist is up to the client (e.g. could be a drop-down, radiobuttons, etc). Can be empty, but Never null. |
setDefaultValue | public void setDefaultValue(String newValue)(Code) | | supply a default value for this
Input object; appropriate for single selection items; sets the 0th item in underlying list
Parameters: newValue - The new default value for this Input item See Also: Input.addDefaultValue See Also: for multiple selection |
setDefaultValue | public void setDefaultValue(List list)(Code) | | supply a list of default values for this
Input object; appropriate for multiple selection items
Parameters: list - The new list of default values (strings) for this Input item See Also: Input.addDefaultValue See Also: for adding multiple selection defaults one at a time |
setKey | public synchronized void setKey(String newKey)(Code) | | The Key of the Input
Parameters: newKey - the new value |
setLookup | public void setLookup(String s)(Code) | | Set the name of the "lookup object" - the database object that
the client can use to look up valid values for this
Input item.
Parameters: s - the lookup class name to associate with the Input |
setMaxLength | public void setMaxLength(int newMaxLength)(Code) | | Set the maximum recommended length of the Input object
Parameters: newMaxLength - Specify the max length (in chars) for thisinput item's value. |
setMultiple | public void setMultiple(String newMultiple)(Code) | | Set the the Input object allow multiple selections
Parameters: newMultiple - Specify if true or false the input will accept multiple selects. |
setName | public void setName(String newName)(Code) | | Sets the inputs name. Also checks against reserved words
Parameters: newName - the new name for the Input throws: IllegalArgumentException - if the name is a 'reserved word' asdefined by ConfigManager. |
setType | public void setType(String newType)(Code) | | Sets the input type
Parameters: newType - the new type as appears in an Input tag |
setValidValues | public void setValidValues(Vector v)(Code) | | Method for the Controller to specify the valid values for this
Input item
Parameters: v - The value/description pairs that make up thevalid values for this Input object. |
toXML | public FastStringBuffer toXML(FastStringBuffer stream)(Code) | | Concert the object to an xml fragment.
Parameters: stream - A FastStringBuffer to append the data to. FastStringBuffer( usually the same one passed in) |
|
|
|