Java Doc for UIInput.java in  » J2EE » myfaces-core-1.2.0 » javax » faces » component » 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 » myfaces core 1.2.0 » javax.faces.component 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.faces.component.UIComponent
      javax.faces.component.UIComponentBase
         javax.faces.component.UIOutput
            javax.faces.component.UIInput

All known Subclasses:   javax.faces.component.UISelectBoolean,  javax.faces.component.html.HtmlInputTextarea,  javax.faces.component.UISelectOne,  javax.faces.component.html.HtmlInputSecret,  javax.faces.component.html.HtmlInputText,  javax.faces.component.html.HtmlInputHidden,  javax.faces.component.UISelectMany,
UIInput
public class UIInput extends UIOutput implements EditableValueHolder(Code)

Events:

Type Phases Description
javax.faces.event.ValueChangeEvent The valueChange event is delivered when the value attribute is changed.


Field Summary
final public static  StringCOMPONENT_FAMILY
    
final public static  StringCOMPONENT_TYPE
    
final public static  StringCONVERSION_MESSAGE_ID
    
final public static  StringREQUIRED_MESSAGE_ID
    
final public static  StringUPDATE_MESSAGE_ID
    

Constructor Summary
public  UIInput()
     Construct an instance of the UIInput.

Method Summary
public  voidaddValidator(Validator validator)
     Adds a Validator Method, which should be invoked for validation.
public  voidaddValueChangeListener(ValueChangeListener listener)
     Adds a valueChange listener.
public  voidbroadcast(FacesEvent event)
    
protected  booleancompareValues(Object previous, Object value)
    
public  voiddecode(FacesContext context)
    
protected  ObjectgetConvertedValue(FacesContext context, Object submittedValue)
     Convert the provided object to the desired value.

If there is a renderer for this component, then call the renderer's getConvertedValue method.

public  StringgetConverterMessage()
     Gets Text of the converter message.
public  StringgetFamily()
    
public  StringgetRequiredMessage()
     Gets Text which will be shown if a required value is not submitted.
public  ObjectgetSubmittedValue()
     Gets the current submitted value.
public  MethodBindinggetValidator()
     Gets Validator Method, which should be invoked for validation.
public  StringgetValidatorMessage()
     Gets Text which will be shown, if validation fails.
public  Validator[]getValidators()
     Gets all Validator Method, which should be invoked for validation.
public  MethodBindinggetValueChangeListener()
     Gets A Method which is called when the value changed.
public  ValueChangeListener[]getValueChangeListeners()
     Returns an array of attached valueChange listeners.
public  booleanisImmediate()
     Gets A boolean value that identifies the phase during which action events should fire.
public  booleanisLocalValueSet()
     Gets whether a local value is currently set.
public  booleanisRequired()
     Gets A boolean value that indicates whether a value is required.
public  booleanisValid()
    
public  voidprocessDecodes(FacesContext context)
     Set the "submitted value" of this component from the relevant data in the current servet request object.

If this component is not rendered, then do nothing; no output would have been sent to the client so no input is expected.

Invoke the inherited functionality, which typically invokes the renderer associated with this component to extract and set this component's "submitted value".

If this component is marked "immediate", then immediately apply validation to the submitted value found.

public  voidprocessUpdates(FacesContext context)
    
public  voidprocessValidators(FacesContext context)
    
public  voidremoveValidator(Validator validator)
     Removes a Validator Method, which should be invoked for validation.
public  voidremoveValueChangeListener(ValueChangeListener listener)
     Removes a valueChange listener.
public  voidresetValue()
    
public  voidrestoreState(FacesContext facesContext, Object state)
    
public  ObjectsaveState(FacesContext facesContext)
    
public  voidsetConverterMessage(String converterMessage)
     Sets Text of the converter message.
public  voidsetImmediate(boolean immediate)
     Sets A boolean value that identifies the phase during which action events should fire.
public  voidsetLocalValueSet(boolean localValueSet)
     Sets whether a local value is currently set.
public  voidsetRequired(boolean required)
     Sets A boolean value that indicates whether a value is required.
public  voidsetRequiredMessage(String requiredMessage)
     Sets Text which will be shown if a required value is not submitted.
public  voidsetSubmittedValue(Object submittedValue)
     Sets the current submitted value.
public  voidsetValid(boolean valid)
    
public  voidsetValidator(MethodBinding validator)
     Sets Validator Method, which should be invoked for validation.
public  voidsetValidatorMessage(String validatorMessage)
     Sets Text which will be shown, if validation fails.
public  voidsetValue(Object value)
     Store the specified object as the "local value" of this component. The value-binding named "value" (if any) is ignored; the object is only stored locally on this component.
public  voidsetValueChangeListener(MethodBinding valueChangeListener)
     Sets A Method which is called when the value changed.
public  voidupdateModel(FacesContext context)
    
public  voidvalidate(FacesContext context)
     Determine whether the new value is valid, and queue a ValueChangeEvent if necessary.

The "submitted value" is converted to the necessary type; conversion failure is reported as an error and validation processing terminates for this component.

protected  voidvalidateValue(FacesContext context, Object convertedValue)
    

Field Detail
COMPONENT_FAMILY
final public static String COMPONENT_FAMILY(Code)



COMPONENT_TYPE
final public static String COMPONENT_TYPE(Code)



CONVERSION_MESSAGE_ID
final public static String CONVERSION_MESSAGE_ID(Code)



REQUIRED_MESSAGE_ID
final public static String REQUIRED_MESSAGE_ID(Code)



UPDATE_MESSAGE_ID
final public static String UPDATE_MESSAGE_ID(Code)




Constructor Detail
UIInput
public UIInput()(Code)
Construct an instance of the UIInput.




Method Detail
addValidator
public void addValidator(Validator validator)(Code)
Adds a Validator Method, which should be invoked for validation.



addValueChangeListener
public void addValueChangeListener(ValueChangeListener listener)(Code)
Adds a valueChange listener.
Parameters:
  listener - the valueChange listener to add



broadcast
public void broadcast(FacesEvent event) throws AbortProcessingException(Code)



compareValues
protected boolean compareValues(Object previous, Object value)(Code)



decode
public void decode(FacesContext context)(Code)



getConvertedValue
protected Object getConvertedValue(FacesContext context, Object submittedValue)(Code)
Convert the provided object to the desired value.

If there is a renderer for this component, then call the renderer's getConvertedValue method. While this can of course be implemented in any way the renderer desires, it typically performs exactly the same processing that this method would have done anyway (ie that described below for the no-renderer case).

Otherwise:

  • If the submittedValue is not a String then just return the submittedValue unconverted.
  • If there is no "value" value-binding then just return the submittedValue unconverted.
  • Use introspection to determine the type of the target property specified by the value-binding, and then use Application.createConverter to find a converter that can map from String to the required type. Apply the converter to the submittedValue and return the result.



getConverterMessage
public String getConverterMessage()(Code)
Gets Text of the converter message. the new converterMessage value



getFamily
public String getFamily()(Code)



getRequiredMessage
public String getRequiredMessage()(Code)
Gets Text which will be shown if a required value is not submitted. the new requiredMessage value



getSubmittedValue
public Object getSubmittedValue()(Code)
Gets the current submitted value. This value, if non-null, is set by the Renderer to store a possibly invalid value for later conversion or redisplay, and has not yet been converted into the proper type for this component instance. This method should only be used by the decode() and validate() method of this component, or its corresponding Renderer; however, user code may manually set it to null to erase any submitted value. the new submittedValue value



getValidator
public MethodBinding getValidator()(Code)
Gets Validator Method, which should be invoked for validation. the new validator value



getValidatorMessage
public String getValidatorMessage()(Code)
Gets Text which will be shown, if validation fails. the new validatorMessage value



getValidators
public Validator[] getValidators()(Code)
Gets all Validator Method, which should be invoked for validation.



getValueChangeListener
public MethodBinding getValueChangeListener()(Code)
Gets A Method which is called when the value changed. the new valueChangeListener value



getValueChangeListeners
public ValueChangeListener[] getValueChangeListeners()(Code)
Returns an array of attached valueChange listeners. an array of attached valueChange listeners.



isImmediate
public boolean isImmediate()(Code)
Gets A boolean value that identifies the phase during which action events should fire. During normal event processing, action methods and action listener methods are fired during the "invoke application" phase of request processing. If this attribute is set to "true", these methods are fired instead at the end of the "apply request values" phase. the new immediate value



isLocalValueSet
public boolean isLocalValueSet()(Code)
Gets whether a local value is currently set. If false, values are being retrieved from any attached ValueBinding the new localValueSet value



isRequired
public boolean isRequired()(Code)
Gets A boolean value that indicates whether a value is required. Default value: false. the new required value



isValid
public boolean isValid()(Code)
Gets whether the component's value is currently valid the new valid value



processDecodes
public void processDecodes(FacesContext context)(Code)
Set the "submitted value" of this component from the relevant data in the current servet request object.

If this component is not rendered, then do nothing; no output would have been sent to the client so no input is expected.

Invoke the inherited functionality, which typically invokes the renderer associated with this component to extract and set this component's "submitted value".

If this component is marked "immediate", then immediately apply validation to the submitted value found. On error, call context method "renderResponse" which will force processing to leap to the "render response" phase as soon as the "decode" step has completed for all other components.




processUpdates
public void processUpdates(FacesContext context)(Code)



processValidators
public void processValidators(FacesContext context)(Code)



removeValidator
public void removeValidator(Validator validator)(Code)
Removes a Validator Method, which should be invoked for validation.



removeValueChangeListener
public void removeValueChangeListener(ValueChangeListener listener)(Code)
Removes a valueChange listener.
Parameters:
  listener - the valueChange listener to remove



resetValue
public void resetValue()(Code)

since:
   1.2



restoreState
public void restoreState(FacesContext facesContext, Object state)(Code)



saveState
public Object saveState(FacesContext facesContext)(Code)



setConverterMessage
public void setConverterMessage(String converterMessage)(Code)
Sets Text of the converter message.
Parameters:
  converterMessage - the new converterMessage value



setImmediate
public void setImmediate(boolean immediate)(Code)
Sets A boolean value that identifies the phase during which action events should fire. During normal event processing, action methods and action listener methods are fired during the "invoke application" phase of request processing. If this attribute is set to "true", these methods are fired instead at the end of the "apply request values" phase.
Parameters:
  immediate - the new immediate value



setLocalValueSet
public void setLocalValueSet(boolean localValueSet)(Code)
Sets whether a local value is currently set. If false, values are being retrieved from any attached ValueBinding
Parameters:
  localValueSet - the new localValueSet value



setRequired
public void setRequired(boolean required)(Code)
Sets A boolean value that indicates whether a value is required. Default value: false.
Parameters:
  required - the new required value



setRequiredMessage
public void setRequiredMessage(String requiredMessage)(Code)
Sets Text which will be shown if a required value is not submitted.
Parameters:
  requiredMessage - the new requiredMessage value



setSubmittedValue
public void setSubmittedValue(Object submittedValue)(Code)
Sets the current submitted value. This value, if non-null, is set by the Renderer to store a possibly invalid value for later conversion or redisplay, and has not yet been converted into the proper type for this component instance. This method should only be used by the decode() and validate() method of this component, or its corresponding Renderer; however, user code may manually set it to null to erase any submitted value.
Parameters:
  submittedValue - the new submittedValue value



setValid
public void setValid(boolean valid)(Code)
Sets whether the component's value is currently valid
Parameters:
  valid - the new valid value



setValidator
public void setValidator(MethodBinding validator)(Code)
Sets Validator Method, which should be invoked for validation.
Parameters:
  validator - the new validator value



setValidatorMessage
public void setValidatorMessage(String validatorMessage)(Code)
Sets Text which will be shown, if validation fails.
Parameters:
  validatorMessage - the new validatorMessage value



setValue
public void setValue(Object value)(Code)
Store the specified object as the "local value" of this component. The value-binding named "value" (if any) is ignored; the object is only stored locally on this component. During the "update model" phase, if there is a value-binding named "value" then this local value will be stored via that value-binding and the "local value" reset to null.



setValueChangeListener
public void setValueChangeListener(MethodBinding valueChangeListener)(Code)
Sets A Method which is called when the value changed.
Parameters:
  valueChangeListener - the new valueChangeListener value



updateModel
public void updateModel(FacesContext context)(Code)



validate
public void validate(FacesContext context)(Code)
Determine whether the new value is valid, and queue a ValueChangeEvent if necessary.

The "submitted value" is converted to the necessary type; conversion failure is reported as an error and validation processing terminates for this component. See documentation for method getConvertedValue for details on the conversion process.

Any validators attached to this component are then run, passing the converted value.

The old value of this component is then fetched (possibly involving the evaluation of a value-binding expression, ie invoking a method on a user object). The old value is compared to the new validated value, and if they are different then a ValueChangeEvent is queued for later processing.

On successful completion of this method:

  • isValid() is true
  • isLocalValueSet() is true
  • submittedValue is reset to null
  • a ValueChangeEvent is queued if the new value != old value



validateValue
protected void validateValue(FacesContext context, Object convertedValue)(Code)



Fields inherited from javax.faces.component.UIOutput
final public static String COMPONENT_FAMILY(Code)(Java Doc)
final public static String COMPONENT_TYPE(Code)(Java Doc)

Methods inherited from javax.faces.component.UIOutput
public Converter getConverter()(Code)(Java Doc)
public String getFamily()(Code)(Java Doc)
public Object getLocalValue()(Code)(Java Doc)
public Object getValue()(Code)(Java Doc)
public void restoreState(FacesContext facesContext, Object state)(Code)(Java Doc)
public Object saveState(FacesContext facesContext)(Code)(Java Doc)
public void setConverter(Converter converter)(Code)(Java Doc)
public void setValue(Object value)(Code)(Java Doc)

Methods inherited from javax.faces.component.UIComponentBase
protected void addFacesListener(FacesListener listener)(Code)(Java Doc)
public void broadcast(FacesEvent event) throws AbortProcessingException(Code)(Java Doc)
public void decode(FacesContext context)(Code)(Java Doc)
public void encodeBegin(FacesContext context) throws IOException(Code)(Java Doc)
public void encodeChildren(FacesContext context) throws IOException(Code)(Java Doc)
public void encodeEnd(FacesContext context) throws IOException(Code)(Java Doc)
public UIComponent findComponent(String expr)(Code)(Java Doc)
public Map<String, Object> getAttributes()(Code)(Java Doc)
public int getChildCount()(Code)(Java Doc)
public List<UIComponent> getChildren()(Code)(Java Doc)
public String getClientId(FacesContext context)(Code)(Java Doc)
T getExpressionValue(String attribute, T explizitValue, T defaultValueIfExpressionNull)(Code)(Java Doc)
protected FacesContext getFacesContext()(Code)(Java Doc)
protected FacesListener[] getFacesListeners(Class clazz)(Code)(Java Doc)
public UIComponent getFacet(String name)(Code)(Java Doc)
public int getFacetCount()(Code)(Java Doc)
public Map<String, UIComponent> getFacets()(Code)(Java Doc)
public Iterator<UIComponent> getFacetsAndChildren()(Code)(Java Doc)
public String getId()(Code)(Java Doc)
public UIComponent getParent()(Code)(Java Doc)
protected Renderer getRenderer(FacesContext context)(Code)(Java Doc)
public String getRendererType()(Code)(Java Doc)
public boolean getRendersChildren()(Code)(Java Doc)
public ValueBinding getValueBinding(String name)(Code)(Java Doc)
public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException(Code)(Java Doc)
public boolean isRendered()(Code)(Java Doc)
public boolean isTransient()(Code)(Java Doc)
public void processDecodes(FacesContext context)(Code)(Java Doc)
public void processRestoreState(FacesContext context, Object state)(Code)(Java Doc)
public Object processSaveState(FacesContext context)(Code)(Java Doc)
public void processUpdates(FacesContext context)(Code)(Java Doc)
public void processValidators(FacesContext context)(Code)(Java Doc)
public void queueEvent(FacesEvent event)(Code)(Java Doc)
protected void removeFacesListener(FacesListener listener)(Code)(Java Doc)
public static Object restoreAttachedState(FacesContext context, Object stateObj) throws IllegalStateException(Code)(Java Doc)
public void restoreState(FacesContext context, Object state)(Code)(Java Doc)
public static Object saveAttachedState(FacesContext context, Object attachedObject)(Code)(Java Doc)
public Object saveState(FacesContext context)(Code)(Java Doc)
public void setId(String id)(Code)(Java Doc)
public void setParent(UIComponent parent)(Code)(Java Doc)
public void setRendered(boolean rendered)(Code)(Java Doc)
public void setRendererType(String rendererType)(Code)(Java Doc)
public void setTransient(boolean transientFlag)(Code)(Java Doc)
public void setValueBinding(String name, ValueBinding binding)(Code)(Java Doc)

Fields inherited from javax.faces.component.UIComponent
protected Map<String, ValueExpression> bindings(Code)(Java Doc)

Methods inherited from javax.faces.component.UIComponent
abstract protected void addFacesListener(javax.faces.event.FacesListener listener)(Code)(Java Doc)
abstract public void broadcast(javax.faces.event.FacesEvent event) throws AbortProcessingException(Code)(Java Doc)
abstract public void decode(javax.faces.context.FacesContext context)(Code)(Java Doc)
public void encodeAll(javax.faces.context.FacesContext context) throws java.io.IOException(Code)(Java Doc)
abstract public void encodeBegin(javax.faces.context.FacesContext context) throws java.io.IOException(Code)(Java Doc)
abstract public void encodeChildren(javax.faces.context.FacesContext context) throws java.io.IOException(Code)(Java Doc)
abstract public void encodeEnd(javax.faces.context.FacesContext context) throws java.io.IOException(Code)(Java Doc)
abstract public javax.faces.component.UIComponent findComponent(java.lang.String expr)(Code)(Java Doc)
abstract public java.util.Map<String, Object> getAttributes()(Code)(Java Doc)
abstract public int getChildCount()(Code)(Java Doc)
abstract public java.util.List<UIComponent> getChildren()(Code)(Java Doc)
abstract public java.lang.String getClientId(javax.faces.context.FacesContext context)(Code)(Java Doc)
public String getContainerClientId(FacesContext ctx)(Code)(Java Doc)
abstract protected javax.faces.context.FacesContext getFacesContext()(Code)(Java Doc)
abstract protected javax.faces.event.FacesListener[] getFacesListeners(java.lang.Class clazz)(Code)(Java Doc)
abstract public javax.faces.component.UIComponent getFacet(java.lang.String name)(Code)(Java Doc)
public int getFacetCount()(Code)(Java Doc)
abstract public java.util.Map<String, UIComponent> getFacets()(Code)(Java Doc)
abstract public java.util.Iterator<UIComponent> getFacetsAndChildren()(Code)(Java Doc)
abstract public java.lang.String getFamily()(Code)(Java Doc)
abstract public java.lang.String getId()(Code)(Java Doc)
abstract public javax.faces.component.UIComponent getParent()(Code)(Java Doc)
abstract protected javax.faces.render.Renderer getRenderer(javax.faces.context.FacesContext context)(Code)(Java Doc)
abstract public java.lang.String getRendererType()(Code)(Java Doc)
abstract public boolean getRendersChildren()(Code)(Java Doc)
abstract public javax.faces.el.ValueBinding getValueBinding(java.lang.String name)(Code)(Java Doc)
public ValueExpression getValueExpression(String name)(Code)(Java Doc)
public boolean invokeOnComponent(javax.faces.context.FacesContext context, String clientId, javax.faces.component.ContextCallback callback) throws javax.faces.FacesException(Code)(Java Doc)
abstract public boolean isRendered()(Code)(Java Doc)
abstract public void processDecodes(javax.faces.context.FacesContext context)(Code)(Java Doc)
abstract public void processRestoreState(javax.faces.context.FacesContext context, java.lang.Object state)(Code)(Java Doc)
abstract public java.lang.Object processSaveState(javax.faces.context.FacesContext context)(Code)(Java Doc)
abstract public void processUpdates(javax.faces.context.FacesContext context)(Code)(Java Doc)
abstract public void processValidators(javax.faces.context.FacesContext context)(Code)(Java Doc)
abstract public void queueEvent(javax.faces.event.FacesEvent event)(Code)(Java Doc)
abstract protected void removeFacesListener(javax.faces.event.FacesListener listener)(Code)(Java Doc)
abstract public void setId(java.lang.String id)(Code)(Java Doc)
abstract public void setParent(javax.faces.component.UIComponent parent)(Code)(Java Doc)
abstract public void setRendered(boolean rendered)(Code)(Java Doc)
abstract public void setRendererType(java.lang.String rendererType)(Code)(Java Doc)
abstract public void setValueBinding(java.lang.String name, javax.faces.el.ValueBinding binding)(Code)(Java Doc)
public void setValueExpression(String name, ValueExpression expression)(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.