Java Doc for EditableValueHolder.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) 


javax.faces.component.EditableValueHolder

All known Subclasses:   javax.faces.component.UIInput,
EditableValueHolder
public interface EditableValueHolder extends ValueHolder(Code)
Defines the methods required for a component whose value can be modified by the user.

When a component implementing this interface is rendered, the value output is (in order):

  • The "submitted value" if non-null.
  • The component's "local value" if non-null.
  • The result of evaluating the value-binding expression with name "value" for this component.

Rendering the submitted value if non-null allows a component to redisplay a user-provided value when validation fails for the component. The submitted value is usually just the plain string extracted from the servlet request. During successful validation of the component, the submitted value is converted to an appropriate datatype, and stored as the component's "local value", and then the "submitted value" is immediately reset to null.

Rendering the "local value" if non-null allows a component to redisplay a page when validation fails for some other component; the model can't be updated unless all components have passed validation. This also allows components to work without a defined "value" value-binding expression. When all components validate, the update model phase runs; all components with "value" value-bindings store the "local value" into the specified property then reset their local value to null.

Rendering the value-binding expression named "value" allows components to display data from the user's model classes. This is the most common way a component's renderer obtains the value to display. see Javadoc of JSF Specification for more.
author:
   Manfred Geiler (latest modification by $Author: mbr $)
version:
   $Revision: 512227 $ $Date: 2007-02-27 13:25:16 +0100 (Di, 27 Feb 2007) $





Method Summary
public  voidaddValidator(Validator validator)
    
public  voidaddValueChangeListener(ValueChangeListener listener)
    
public  ObjectgetSubmittedValue()
     Get an object representing the most recent raw user input received for this component.

This is non-null only between decode and validate phases, or when validation for the component has not succeeded.

public  MethodBindinggetValidator()
     Get the single validator defined directly on this component.
public  Validator[]getValidators()
    
public  MethodBindinggetValueChangeListener()
     Get the single value-change defined directly on this component.
public  ValueChangeListener[]getValueChangeListeners()
    
public  booleanisImmediate()
     When true, the validation step for this component will also invoke any associated actionListeners.
public  booleanisLocalValueSet()
     Determine whether the value member variable of this component has been set from the converted and validated "submitted value".
public  booleanisRequired()
     Return true if this component must have a non-empty submitted value.

Note that even when a component is "required", it is not an error for some form to be submitted which does not contain the component.

public  booleanisValid()
     This returns false if validation has been run for this component and has failed.
public  voidremoveValidator(Validator validator)
    
public  voidremoveValueChangeListener(ValueChangeListener listener)
    
public  voidsetImmediate(boolean immediate)
    
public  voidsetLocalValueSet(boolean localValueSet)
     Specify the return value of method isLocalValueSet.
public  voidsetRequired(boolean required)
     Set to true to cause validation failure when a form containing this component is submitted and there is no value selected for this component.
public  voidsetSubmittedValue(Object submittedValue)
     Invoked during the "decode" phase of processing to inform this component what data was received from the user.
public  voidsetValid(boolean valid)
    
public  voidsetValidator(javax.faces.el.MethodBinding validatorBinding)
    
public  voidsetValueChangeListener(MethodBinding valueChangeMethod)
    



Method Detail
addValidator
public void addValidator(Validator validator)(Code)



addValueChangeListener
public void addValueChangeListener(ValueChangeListener listener)(Code)



getSubmittedValue
public Object getSubmittedValue()(Code)
Get an object representing the most recent raw user input received for this component.

This is non-null only between decode and validate phases, or when validation for the component has not succeeded. Once conversion and validation has succeeded, the (converted) value is stored in the local "value" property of this component, and the submitted value is reset to null.




getValidator
public MethodBinding getValidator()(Code)
Get the single validator defined directly on this component.

In addition to this validator, there may be a list of validators associated with this component.

This validator is executed after all validators in the validator list.




getValidators
public Validator[] getValidators()(Code)



getValueChangeListener
public MethodBinding getValueChangeListener()(Code)
Get the single value-change defined directly on this component.

In addition to this listener, there may be a list of listeners associated with this component.

This listeners is executed after all listeners in the list.




getValueChangeListeners
public ValueChangeListener[] getValueChangeListeners()(Code)



isImmediate
public boolean isImmediate()(Code)
When true, the validation step for this component will also invoke any associated actionListeners. Typically such listeners will call renderResponse, causing the rendering phase to begin immediately (including possible navigation) without performing validation on any following components.



isLocalValueSet
public boolean isLocalValueSet()(Code)
Determine whether the value member variable of this component has been set from the converted and validated "submitted value". This property is needed because EditableValueHolder components need to distinguish between the value local member and the value property (which may involve a value-binding to the user model).



isRequired
public boolean isRequired()(Code)
Return true if this component must have a non-empty submitted value.

Note that even when a component is "required", it is not an error for some form to be submitted which does not contain the component. It is only an error when the form submitted does contain the component, but there is no data for the component in that request. A "submitted value" of null is set during the "decode" step to represent the case where the request map has no entry corresponding to this component's id. When the decode step finds an entry in the request, but the corresponding value represents "no data" (eg an empty string for a text input field) then some special non-null value must be set for the "submitted value"; validation for "required" fields must then check for that.




isValid
public boolean isValid()(Code)
This returns false if validation has been run for this component and has failed.

It is also set to false if the validated value could not be passed to the model during the update model phase.

All input components are marked as valid during the "restore view" phase, so this will return true for components whose validation has not been executed.




removeValidator
public void removeValidator(Validator validator)(Code)



removeValueChangeListener
public void removeValueChangeListener(ValueChangeListener listener)(Code)



setImmediate
public void setImmediate(boolean immediate)(Code)



setLocalValueSet
public void setLocalValueSet(boolean localValueSet)(Code)
Specify the return value of method isLocalValueSet. This is called after the local value member has been set from the converted and validated "submitted value". It is cleared after that value has been pushed to the user model via the value-binding named "value".



setRequired
public void setRequired(boolean required)(Code)
Set to true to cause validation failure when a form containing this component is submitted and there is no value selected for this component.



setSubmittedValue
public void setSubmittedValue(Object submittedValue)(Code)
Invoked during the "decode" phase of processing to inform this component what data was received from the user.

In many cases the submitted value is a plain string extracted from the current servlet request object.

In cases where a component is rendered as multiple input components (eg a calendar control with separate day/month/year fields), the submittedValue may be some custom object wrapping the data. However the provided object must be able to represent all possible user input values, not just valid ones.




setValid
public void setValid(boolean valid)(Code)



setValidator
public void setValidator(javax.faces.el.MethodBinding validatorBinding)(Code)



setValueChangeListener
public void setValueChangeListener(MethodBinding valueChangeMethod)(Code)



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