Source Code Cross Referenced 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 Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2004 The Apache Software Foundation.
003:         * 
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         * 
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package javax.faces.component;
017:
018:        import javax.faces.el.MethodBinding;
019:        import javax.faces.event.ValueChangeListener;
020:        import javax.faces.validator.Validator;
021:
022:        /**
023:         * Defines the methods required for a component whose value can be
024:         * modified by the user.
025:         * <p>
026:         * When a component implementing this interface is rendered, the value
027:         * output is (in order):
028:         * <ul>
029:         * <li>The "submitted value" if non-null.
030:         * <li>The component's "local value" if non-null.
031:         * <li>The result of evaluating the value-binding expression with name
032:         *  "value" for this component.
033:         * </ul>
034:         * <p>
035:         * Rendering the submitted value if non-null allows a component to redisplay
036:         * a user-provided value when validation fails for the component. The
037:         * submitted value is usually just the plain string extracted from the
038:         * servlet request. During successful validation of the component, the
039:         * submitted value is converted to an appropriate datatype, and stored as
040:         * the component's "local value", and then the "submitted value" is
041:         * immediately reset to null. 
042:         * <p>
043:         * Rendering the "local value" if non-null allows a component to redisplay
044:         * a page when validation fails for some other component; the model can't
045:         * be updated unless <i>all</i> components have passed validation. This
046:         * also allows components to work without a defined "value" value-binding
047:         * expression. When all components validate, the update model phase runs;
048:         * all components with "value" value-bindings store the "local value" into
049:         * the specified property then reset their local value to null.
050:         * <p>
051:         * Rendering the value-binding expression named "value" allows components
052:         * to display data from the user's model classes. This is the most common
053:         * way a component's renderer obtains the value to display.
054:         * 
055:         * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a> for more.
056:         * 
057:         * @author Manfred Geiler (latest modification by $Author: mbr $)
058:         * @version $Revision: 512227 $ $Date: 2007-02-27 13:25:16 +0100 (Di, 27 Feb 2007) $
059:         */
060:        public interface EditableValueHolder extends ValueHolder {
061:            /**
062:             * Get an object representing the most recent raw user input
063:             * received for this component.
064:             * <p>
065:             * This is non-null only between <code>decode</code> and
066:             * <code>validate</code> phases, or when validation for the
067:             * component has not succeeded. Once conversion and validation has
068:             * succeeded, the (converted) value is stored in the local "value"
069:             * property of this component, and the submitted value is reset to null.
070:             */
071:            public Object getSubmittedValue();
072:
073:            /**
074:             * Invoked during the "decode" phase of processing to inform this
075:             * component what data was received from the user.
076:             * <p>
077:             * In many cases the submitted value is a plain string extracted
078:             * from the current servlet request object.
079:             * <p>
080:             * In cases where a component is rendered as multiple input components
081:             * (eg a calendar control with separate day/month/year fields), the
082:             * submittedValue may be some custom object wrapping the data.
083:             * However the provided object <i>must</i> be able to represent all
084:             * possible user input values, not just valid ones.
085:             */
086:            public void setSubmittedValue(Object submittedValue);
087:
088:            /**
089:             * Determine whether the value member variable of this component has
090:             * been set from the converted and validated "submitted value". This
091:             * property is needed because EditableValueHolder components need
092:             * to distinguish between the value local <i>member</i> and the
093:             * value <i>property</i> (which may involve a value-binding to the
094:             * user model).
095:             */
096:            public boolean isLocalValueSet();
097:
098:            /**
099:             * Specify the return value of method isLocalValueSet. This is called
100:             * after the local value member has been set from the converted and
101:             * validated "submitted value". It is cleared after that value has
102:             * been pushed to the user model via the value-binding named "value".
103:             */
104:            public void setLocalValueSet(boolean localValueSet);
105:
106:            /**
107:             * This returns false if validation has been run for this component
108:             * and has failed.
109:             * <p>
110:             * It is also set to false if the validated value could not be passed
111:             * to the model during the update model phase.
112:             * <p>
113:             * All input components are marked as valid during the "restore view"
114:             * phase, so this will return true for components whose validation
115:             * has not been executed.
116:             */
117:            public boolean isValid();
118:
119:            public void setValid(boolean valid);
120:
121:            /**
122:             * Return true if this component must have a non-empty submitted
123:             * value.
124:             * <p>
125:             * Note that even when a component is "required", it is not an 
126:             * error for some form to be submitted which does not contain
127:             * the component. It is only an error when the form submitted
128:             * does contain the component, but there is no data for the
129:             * component in that request. A "submitted value" of null is
130:             * set during the "decode" step to represent the case where
131:             * the request map has no entry corresponding to this component's
132:             * id. When the decode step finds an entry in the request, but
133:             * the corresponding value represents "no data" (eg an empty
134:             * string for a text input field) then some special non-null
135:             * value must be set for the "submitted value"; validation
136:             * for "required" fields must then check for that.
137:             */
138:            public boolean isRequired();
139:
140:            /**
141:             * Set to true to cause validation failure when a form
142:             * containing this component is submitted and there is no
143:             * value selected for this component.
144:             */
145:            public void setRequired(boolean required);
146:
147:            /**
148:             * When true, the validation step for this component will also
149:             * invoke any associated actionListeners. Typically such listeners
150:             * will call renderResponse, causing the rendering phase to begin
151:             * immediately (including possible navigation) without performing
152:             * validation on any following components.
153:             */
154:            public boolean isImmediate();
155:
156:            public void setImmediate(boolean immediate);
157:
158:            /**
159:             * Get the single validator defined directly on this component.
160:             * <p>
161:             * In addition to this validator, there may be a list of validators
162:             * associated with this component.
163:             * <p>
164:             * This validator is executed after all validators in the validator list.
165:             *
166:             * @deprecated Use getValidators() instead.
167:             */
168:            public MethodBinding getValidator();
169:
170:            /**
171:             * @deprecated Use addValidator(MethodExpressionValidaotr) instead.
172:             */
173:            public void setValidator(
174:                    javax.faces.el.MethodBinding validatorBinding);
175:
176:            /**
177:             * Get the single value-change defined directly on this component.
178:             * <p>
179:             * In addition to this listener, there may be a list of listeners
180:             * associated with this component.
181:             * <p>
182:             * This listeners is executed after all listeners in the list.
183:             *
184:             * @deprecated Use getValueChangeLIsteners() instead.
185:             */
186:            public MethodBinding getValueChangeListener();
187:
188:            /**
189:             * @deprecated use addValueChangeListener(MethodExpressionValueChangeListener) instead.
190:             */
191:            public void setValueChangeListener(MethodBinding valueChangeMethod);
192:
193:            public void addValidator(Validator validator);
194:
195:            public Validator[] getValidators();
196:
197:            public void removeValidator(Validator validator);
198:
199:            public void addValueChangeListener(ValueChangeListener listener);
200:
201:            public ValueChangeListener[] getValueChangeListeners();
202:
203:            public void removeValueChangeListener(ValueChangeListener listener);
204:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.