Java Doc for Input.java in  » J2EE » Expresso » com » jcorporate » expresso » core » controller » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Expresso » com.jcorporate.expresso.core.controller 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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



Field Summary
final public static  StringATTRIBUTE_CHECKBOX
    
final public static  StringATTRIBUTE_CHECKBOX_VERTICAL
    
final public static  StringATTRIBUTE_CSS_STYLE
     Defines the CSS style to use when rendering the input.
final public static  StringATTRIBUTE_DROPDOWN
    
final public static  StringATTRIBUTE_FILE
     The Input is indended to be a file upload box.
final public static  StringATTRIBUTE_HIDDEN
    
final public static  StringATTRIBUTE_LISTBOX
    
final public static  StringATTRIBUTE_MULTIVALUED
     Means that the Input will be some sort of multi-valued field and has valid values associated with it.
final public static  StringATTRIBUTE_ORIGINAL_VALUE
     Attribute that contains the original value of this input.
final public static  StringATTRIBUTE_PASSWORD
     Attribute for password boxes.
final public static  StringATTRIBUTE_RADIO
    
final public static  StringATTRIBUTE_RADIO_VERTICAL
    
final public static  StringATTRIBUTE_READONLY
     The Input is intended to be read only.
final public static  StringATTRIBUTE_TEXTAREA
    
final public static  StringATTRIBUTE_TEXTLINE
    
final public static  StringATTRIBUTE_TYPE
    
final public static  StringSELECTED
    

Constructor Summary
public  Input()
    
public  Input(String newName)
    
public  Input(String newName, String newLabel)
    

Method Summary
public  voidaddDefaultValue(String newValue)
    
public synchronized  voidaddValidValue(String value, String descrip)
    
public  Objectclone()
    
public static  ControllerElementfromXML(Node n)
     Return a controller element based upon the xml fragment [Factory Method]
Parameters:
  n - A DOM node to assemble this Input from.
public  StringgetContent()
    
public  StringgetDefaultValue()
    
public  ArrayListgetDefaultValueList()
    
public  StringgetKey()
     Retrieve the key for the input.
public  StringgetLookup()
     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.
public  intgetMaxLength()
     Return the maximum recommended length of the value for this Input object.
public  StringgetMultiple()
     Retrieve the multi select status.
public  StringgetSelectedDisplay()
     get the display string associated with the currently-selected (default).
public  VectorgetValidValues()
     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.
public  voidsetDefaultValue(String newValue)
    
public  voidsetDefaultValue(List list)
    
public  voidsetDefaultValue(ControllerResponse response)
     Convenience method to quickly set the default value from the form cache.
public synchronized  voidsetKey(String newKey)
    
public  voidsetLookup(String s)
     Set the name of the "lookup object" - the database object that the client can use to look up valid values for this Input item.
public  voidsetMaxLength(int newMaxLength)
    
public  voidsetMultiple(String newMultiple)
    
public  voidsetName(String newName)
     Sets the inputs name.
public  voidsetType(String newType)
    
public  voidsetValidValues(Vector v)
    
public  FastStringBuffertoXML(FastStringBuffer stream)
     Concert the object to an xml fragment.
Parameters:
  stream - A FastStringBuffer to append the data to.

Field Detail
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




Constructor Detail
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




Method Detail
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.



clone
public Object clone() throws CloneNotSupportedException(Code)
Clones the input as per standard java.lang.Object specifications java.lang.Object which is actually an Input.



fromXML
public static ControllerElement fromXML(Node n) throws ControllerException(Code)
Return a controller element based upon the xml fragment [Factory Method]
Parameters:
  n - A DOM node to assemble this Input from. a constructed ControllerElement [Really an Input]
throws:
  ControllerException - if there was a parsing error. (ie malformednodes)
throws:
  ControllerException - upon error



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



setDefaultValue
public void setDefaultValue(ControllerResponse response) throws ControllerException(Code)
Convenience method to quickly set the default value from the form cache.
Parameters:
  response - The controller response where the form cache may exist
throws:
  ControllerException - upon error



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)



Methods inherited from com.jcorporate.expresso.core.controller.ControllerElement
public void addNested(ControllerElement e)(Code)(Java Doc)
public Vector allNested()(Code)(Java Doc)
public Object clone() throws java.lang.CloneNotSupportedException(Code)(Java Doc)
public static ControllerElement fromXML(Node n) throws ControllerException(Code)(Java Doc)
protected static ControllerElement fromXML(Node n, ControllerElement ce) throws ControllerException(Code)(Java Doc)
public String getAttribute(String att)(Code)(Java Doc)
public HashMap getAttributes()(Code)(Java Doc)
public HashMap getAttributesOrNull()(Code)(Java Doc)
public ControllerElement getContent(String name)(Code)(Java Doc)
public Vector getContents()(Code)(Java Doc)
protected ControllerResponse getControllerResponse()(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public int getDisplayLength()(Code)(Java Doc)
public String getLabel()(Code)(Java Doc)
public int getLines()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public Vector getNested()(Code)(Java Doc)
public ControllerElement getNested(String nestedName) throws ControllerException(Code)(Java Doc)
public int getNestedCount()(Code)(Java Doc)
public Iterator getNestedIterator()(Code)(Java Doc)
public Map getNestedMap()(Code)(Java Doc)
public Vector getNestedOrNull()(Code)(Java Doc)
public ControllerElement getParent()(Code)(Java Doc)
public String getTitle()(Code)(Java Doc)
public String getType()(Code)(Java Doc)
public void remove() throws ControllerException(Code)(Java Doc)
public void removeNested(ControllerElement elementToRemove) throws ControllerException(Code)(Java Doc)
public void setAttribute(String attrib, String val)(Code)(Java Doc)
public synchronized void setControllerResponse(ControllerResponse newResponse)(Code)(Java Doc)
public void setDescription(String newDescription)(Code)(Java Doc)
public void setDisplayLength(int newLength)(Code)(Java Doc)
public void setLabel(String newLabel)(Code)(Java Doc)
public void setLines(int newLines)(Code)(Java Doc)
public void setName(String newName)(Code)(Java Doc)
public void setParent(ControllerElement t)(Code)(Java Doc)
public void setType(String s)(Code)(Java Doc)
public FastStringBuffer toXML(FastStringBuffer stream)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.