Java Doc for InputElement.java in  » Ajax » zk » org » zkoss » mil » impl » 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 » Ajax » zk » org.zkoss.mil.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.zkoss.mil.Item
   org.zkoss.mil.impl.InputElement

All known Subclasses:   org.zkoss.mil.Decimalbox,  org.zkoss.mil.Textbox,  org.zkoss.mil.Intbox,
InputElement
abstract public class InputElement extends Item (Code)
TextField related component.
author:
   henrichen

Inner Class :protected class ExtraCtrl implements Inputable

Field Summary
final protected static  intANY
    
final protected static  intCONSTRAINT_MASK
    
final protected static  intDECIMAL
    
final protected static  intEMAILADDR
    
final protected static  intINITIAL_CAPS_SENTENCE
    
final protected static  intINITIAL_CAPS_WORD
    
final protected static  intNON_PREDICTIVE
    
final protected static  intNUMERIC
    
final protected static  intPASSWORD
    
final protected static  intPHONENUMBER
    
final protected static  intSENSITIVE
    
final protected static  intUNEDITABLE
    
final protected static  intURL
    


Method Summary
abstract protected  ObjectcoerceFromString(String value)
     Coerces the value passed to InputElement.setText .

Deriving note:
If you want to store the value in other type, say BigDecimal, you have to override InputElement.coerceToString and InputElement.coerceFromString to convert between a string and your targeting type.

Moreover, when org.zkoss.mil.Textbox is called, it calls this method with value = null.

abstract protected  StringcoerceToString(Object value)
     Coerces the value passed to InputElement.setText .
protected  intgetConstraints()
    
public  StringgetInnerAttrs()
    
abstract protected  intgetInternalType()
     Internal type of this InputElement (ANY, EMAILADDR, NUMERIC, PHONENUMBER, URL, or DECIMAL).
public  intgetMaxlength()
     Returns the maxlength.
public  StringgetOuterAttrs()
    
public  StringgetRawText()
     Returns the text directly without checking whether any error message not yet fixed.
public  ObjectgetRawValue()
     Returns the raw value directly with checking whether any error message not yet fixed.
protected  ObjectgetTargetValue()
     Returns the value in the targeting type.
public  StringgetText()
     Returns the value in the String format.
public  StringgetType()
     Returns the type.
public  booleanisReadonly()
     Returns whether it is readonly.
protected  ObjectnewExtraCtrl()
    
public  voidsetMaxlength(int maxlength)
     Sets the maxlength.
public  voidsetRawValue(Object value)
     Sets the raw value directly.
public  voidsetReadonly(boolean readonly)
     Sets whether it is readonly.
public  voidsetText(String value)
     Sets the value in the String format.
protected  voidsmartUpdateConstraints()
    

Field Detail
ANY
final protected static int ANY(Code)



CONSTRAINT_MASK
final protected static int CONSTRAINT_MASK(Code)



DECIMAL
final protected static int DECIMAL(Code)



EMAILADDR
final protected static int EMAILADDR(Code)



INITIAL_CAPS_SENTENCE
final protected static int INITIAL_CAPS_SENTENCE(Code)



INITIAL_CAPS_WORD
final protected static int INITIAL_CAPS_WORD(Code)



NON_PREDICTIVE
final protected static int NON_PREDICTIVE(Code)



NUMERIC
final protected static int NUMERIC(Code)



PASSWORD
final protected static int PASSWORD(Code)



PHONENUMBER
final protected static int PHONENUMBER(Code)



SENSITIVE
final protected static int SENSITIVE(Code)



UNEDITABLE
final protected static int UNEDITABLE(Code)



URL
final protected static int URL(Code)





Method Detail
coerceFromString
abstract protected Object coerceFromString(String value) throws WrongValueException(Code)
Coerces the value passed to InputElement.setText .

Deriving note:
If you want to store the value in other type, say BigDecimal, you have to override InputElement.coerceToString and InputElement.coerceFromString to convert between a string and your targeting type.

Moreover, when org.zkoss.mil.Textbox is called, it calls this method with value = null. Derives shall handle this case properly.




coerceToString
abstract protected String coerceToString(Object value)(Code)
Coerces the value passed to InputElement.setText .

Default: convert null to an empty string.

Deriving note:
If you want to store the value in other type, say BigDecimal, you have to override InputElement.coerceToString and InputElement.coerceFromString to convert between a string and your targeting type.




getConstraints
protected int getConstraints()(Code)



getInnerAttrs
public String getInnerAttrs()(Code)



getInternalType
abstract protected int getInternalType()(Code)
Internal type of this InputElement (ANY, EMAILADDR, NUMERIC, PHONENUMBER, URL, or DECIMAL).



getMaxlength
public int getMaxlength()(Code)
Returns the maxlength.

Default: 32.




getOuterAttrs
public String getOuterAttrs()(Code)



getRawText
public String getRawText()(Code)
Returns the text directly without checking whether any error message not yet fixed.
See Also:   InputElement.getRawValue
See Also:   InputElement.getText



getRawValue
public Object getRawValue()(Code)
Returns the raw value directly with checking whether any error message not yet fixed.
See Also:   InputElement.getRawText
See Also:   InputElement.getText
See Also:   InputElement.setRawValue



getTargetValue
protected Object getTargetValue() throws WrongValueException(Code)
Returns the value in the targeting type.
exception:
  WrongValueException - if the user entered a wrong value
See Also:   InputElement.getText



getText
public String getText() throws WrongValueException(Code)
Returns the value in the String format. In most case, you shall use the setValue method instead, e.g., org.zkoss.mil.Textbox.getValue .

It invokes InputElement.coerceToString to convert the stored value into a string.
exception:
  WrongValueException - if user entered a wrong value




getType
public String getType()(Code)
Returns the type.

Default: text.




isReadonly
public boolean isReadonly()(Code)
Returns whether it is readonly.

Default: false.




newExtraCtrl
protected Object newExtraCtrl()(Code)



setMaxlength
public void setMaxlength(int maxlength)(Code)
Sets the maxlength.



setRawValue
public void setRawValue(Object value)(Code)
Sets the raw value directly. The caller must make sure the value is correct (or intend to be incorrect), because this method doesn't do any validation.

If you feel confusing with setValue, such as org.zkoss.mil.Textbox.setValue , it is usually better to use setValue instead. This method is reserved for developer that really want to set an 'illegal' value (such as an empty string to a textbox with no-empty contraint).

Like setValue, the result is returned back to the server by calling InputElement.getText .
See Also:   InputElement.getRawValue




setReadonly
public void setReadonly(boolean readonly)(Code)
Sets whether it is readonly.



setText
public void setText(String value) throws WrongValueException(Code)
Sets the value in the String format. In most case, you shall use the setValue method instead, e.g., org.zkoss.mil.Textbox.setValue .

It invokes InputElement.coerceFromString . Derives might override them for type conversion and special validation.
Parameters:
  value - the value; If null, it is considered as empty.




smartUpdateConstraints
protected void smartUpdateConstraints()(Code)



Fields inherited from org.zkoss.mil.Item
final protected static int BUTTON(Code)(Java Doc)
final protected static int HYPERLINK(Code)(Java Doc)
final protected static int LAYOUT_2(Code)(Java Doc)
final protected static int LAYOUT_BOTTOM(Code)(Java Doc)
final protected static int LAYOUT_CENTER(Code)(Java Doc)
final protected static int LAYOUT_DEFAULT(Code)(Java Doc)
final protected static int LAYOUT_EXPAND(Code)(Java Doc)
final protected static int LAYOUT_LEFT(Code)(Java Doc)
final protected static int LAYOUT_NEWLINE_AFTER(Code)(Java Doc)
final protected static int LAYOUT_NEWLINE_BEFORE(Code)(Java Doc)
final protected static int LAYOUT_RIGHT(Code)(Java Doc)
final protected static int LAYOUT_SHRINK(Code)(Java Doc)
final protected static int LAYOUT_TOP(Code)(Java Doc)
final protected static int LAYOUT_VCENTER(Code)(Java Doc)
final protected static int LAYOUT_VEXPAND(Code)(Java Doc)
final protected static int LAYOUT_VSHRINK(Code)(Java Doc)
final protected static int PLAIN(Code)(Java Doc)
protected String _align(Code)(Java Doc)
protected String _flow(Code)(Java Doc)
protected String _heightHint(Code)(Java Doc)
protected String _label(Code)(Java Doc)
protected int _preferredHeight(Code)(Java Doc)
protected int _preferredWidth(Code)(Java Doc)
protected String _valign(Code)(Java Doc)
protected String _widthHint(Code)(Java Doc)

Methods inherited from org.zkoss.mil.Item
public String getAlign()(Code)(Java Doc)
public String getFlow()(Code)(Java Doc)
public String getHeightHint()(Code)(Java Doc)
public String getInnerAttrs()(Code)(Java Doc)
public String getLabel()(Code)(Java Doc)
public int getPreferredHeight()(Code)(Java Doc)
public int getPreferredWidth()(Code)(Java Doc)
public String getValign()(Code)(Java Doc)
public String getWidthHint()(Code)(Java Doc)
public void setAlign(String align)(Code)(Java Doc)
public void setFlow(String flow)(Code)(Java Doc)
public void setHeightHint(String heightHint)(Code)(Java Doc)
public void setLabel(String label)(Code)(Java Doc)
public void setParent(Component parent)(Code)(Java Doc)
public void setPreferredHeight(int preferredHeight)(Code)(Java Doc)
public void setPreferredWidth(int preferredWidth)(Code)(Java Doc)
public void setValign(String valign)(Code)(Java Doc)
public void setWidthHint(String widthHint)(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.