Java Doc for BindingResult.java in  » J2EE » spring-framework-2.0.6 » org » springframework » validation » 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 » spring framework 2.0.6 » org.springframework.validation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.validation.BindingResult

All known Subclasses:   org.springframework.validation.BindException,  org.springframework.validation.AbstractBindingResult,
BindingResult
public interface BindingResult extends Errors(Code)
General interface that represents binding results. Extends the Errors interface for error registration capabilities, allowing for a Validator to be applied, and adds binding-specific analysis and model building.

Serves as result holder for a DataBinder , obtained via the DataBinder.getBindingResult method. BindingResult implementations can also be used directly, for example to invoke a Validator on it (e.g. as part of a unit test).
author:
   Juergen Hoeller
since:
   2.0
See Also:   DataBinder
See Also:   Errors
See Also:   Validator
See Also:   BeanPropertyBindingResult
See Also:   DirectFieldBindingResult
See Also:   MapBindingResult



Field Summary
 StringMODEL_KEY_PREFIX
     Prefix for the name of the BindingResult instance in a model, followed by the object name.


Method Summary
 voidaddError(ObjectError error)
     Add a custom ObjectError or FieldError to the errors list.
 MapgetModel()
     Return a model Map for the obtained state, exposing a BindingResult instance as ' BindingResult.MODEL_KEY_PREFIX MODEL_KEY_PREFIX + objectName' and the object itself as 'objectName'.

Note that the Map is constructed every time you're calling this method. Adding things to the map and then re-calling this method will not work.

The attributes in the model Map returned by this method are usually included in the org.springframework.web.servlet.ModelAndView for a form view that uses Spring's bind tag in a JSP, which needs access to the BindingResult instance.

 PropertyEditorRegistrygetPropertyEditorRegistry()
     Return the underlying PropertyEditorRegistry.
 String[]getSuppressedFields()
     Return the list of fields that were suppressed during the bind process.
 ObjectgetTarget()
     Return the wrapped target object, which may be a bean, an object with public fields, a Map - depending on the concrete binding strategy.
 voidrecordSuppressedField(String fieldName)
     Mark the specified disallowed field as suppressed.
 String[]resolveMessageCodes(String errorCode, String field)
     Resolve the given error code into message codes for the given field.

Field Detail
MODEL_KEY_PREFIX
String MODEL_KEY_PREFIX(Code)
Prefix for the name of the BindingResult instance in a model, followed by the object name.





Method Detail
addError
void addError(ObjectError error)(Code)
Add a custom ObjectError or FieldError to the errors list.

Intended to be used by cooperating strategies such as BindingErrorProcessor .
See Also:   ObjectError
See Also:   FieldError
See Also:   BindingErrorProcessor




getModel
Map getModel()(Code)
Return a model Map for the obtained state, exposing a BindingResult instance as ' BindingResult.MODEL_KEY_PREFIX MODEL_KEY_PREFIX + objectName' and the object itself as 'objectName'.

Note that the Map is constructed every time you're calling this method. Adding things to the map and then re-calling this method will not work.

The attributes in the model Map returned by this method are usually included in the org.springframework.web.servlet.ModelAndView for a form view that uses Spring's bind tag in a JSP, which needs access to the BindingResult instance. Spring's pre-built form controllers will do this for you when rendering a form view. When building the ModelAndView instance yourself, you need to include the attributes from the model Map returned by this method.
See Also:   BindingResult.getObjectName()
See Also:   BindingResult.MODEL_KEY_PREFIX
See Also:   org.springframework.web.servlet.ModelAndView
See Also:   org.springframework.web.servlet.tags.BindTag
See Also:   org.springframework.web.servlet.mvc.SimpleFormController




getPropertyEditorRegistry
PropertyEditorRegistry getPropertyEditorRegistry()(Code)
Return the underlying PropertyEditorRegistry.
throws:
  UnsupportedOperationException - if the BindingResultdoes not support a PropertyEditorRegistry



getSuppressedFields
String[] getSuppressedFields()(Code)
Return the list of fields that were suppressed during the bind process.

Can be used to determine whether any field values were targeting disallowed fields.
See Also:   DataBinder.setAllowedFields




getTarget
Object getTarget()(Code)
Return the wrapped target object, which may be a bean, an object with public fields, a Map - depending on the concrete binding strategy.



recordSuppressedField
void recordSuppressedField(String fieldName)(Code)
Mark the specified disallowed field as suppressed.

The data binder invokes this for each field value that was detected to target a disallowed field.
See Also:   DataBinder.setAllowedFields




resolveMessageCodes
String[] resolveMessageCodes(String errorCode, String field)(Code)
Resolve the given error code into message codes for the given field.

Calls the configured MessageCodesResolver with appropriate parameters.
Parameters:
  errorCode - the error code to resolve into message codes
Parameters:
  field - the field to resolve message codes for the resolved message codes




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