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


org.springframework.web.bind.WebDataBinder
   org.springframework.web.portlet.bind.PortletRequestDataBinder

PortletRequestDataBinder
public class PortletRequestDataBinder extends WebDataBinder (Code)
Special DataBinder to perform data binding from PortletRequest parameters to JavaBeans.

See the DataBinder/WebDataBinder superclasses for customization options, which include specifying allowed/required fields, and registering custom property editors.

Used by Spring Portlet MVC's BaseCommandController. Note that BaseCommandController and its subclasses allow for easy customization of the binder instances that they use through overriding initBinder.

Can also be used for manual data binding in custom web controllers: for example, in a plain Portlet Controller implementation. Simply instantiate a PortletRequestDataBinder for each binding process, and invoke bind with the current PortletRequest as argument:

 MyBean myBean = new MyBean();
 // apply binder to custom target object
 PortletRequestDataBinder binder = new PortletRequestDataBinder(myBean);
 // register custom editors, if desired
 binder.registerCustomEditor(...);
 // trigger actual binding of request parameters
 binder.bind(request);
 // optionally evaluate binding errors
 Errors errors = binder.getErrors();
 ...

author:
   Juergen Hoeller
author:
   John A. Lewis
since:
   2.0
See Also:   PortletRequestDataBinder.bind(javax.portlet.PortletRequest)
See Also:   PortletRequestDataBinder.registerCustomEditor
See Also:   PortletRequestDataBinder.setAllowedFields
See Also:   PortletRequestDataBinder.setRequiredFields
See Also:   PortletRequestDataBinder.setFieldMarkerPrefix
See Also:   org.springframework.web.portlet.mvc.BaseCommandController.initBinder



Constructor Summary
public  PortletRequestDataBinder(Object target)
     Create a new PortletRequestDataBinder instance, with default object name.
public  PortletRequestDataBinder(Object target, String objectName)
     Create a new PortletRequestDataBinder instance.

Method Summary
public  voidbind(PortletRequest request)
     Bind the parameters of the given request to this binder's target, also binding multipart files in case of a multipart request.

This call can create field errors, representing basic binding errors like a required field (code "required"), or type mismatch between value and bean property (code "typeMismatch").

Multipart files are bound via their parameter name, just like normal HTTP parameters: i.e.

public  voidcloseNoCatch()
     Treats errors as fatal.


Constructor Detail
PortletRequestDataBinder
public PortletRequestDataBinder(Object target)(Code)
Create a new PortletRequestDataBinder instance, with default object name.
Parameters:
  target - target object to bind onto
See Also:   PortletRequestDataBinder.DEFAULT_OBJECT_NAME



PortletRequestDataBinder
public PortletRequestDataBinder(Object target, String objectName)(Code)
Create a new PortletRequestDataBinder instance.
Parameters:
  target - target object to bind onto
Parameters:
  objectName - objectName of the target object




Method Detail
bind
public void bind(PortletRequest request)(Code)
Bind the parameters of the given request to this binder's target, also binding multipart files in case of a multipart request.

This call can create field errors, representing basic binding errors like a required field (code "required"), or type mismatch between value and bean property (code "typeMismatch").

Multipart files are bound via their parameter name, just like normal HTTP parameters: i.e. "uploadedFile" to an "uploadedFile" bean property, invoking a "setUploadedFile" setter method.

The type of the target property for a multipart file can be MultipartFile, byte[], or String. The latter two receive the contents of the uploaded file; all metadata like original file name, content type, etc are lost in those cases.
Parameters:
  request - request with parameters to bind (can be multipart)
See Also:   org.springframework.web.portlet.multipart.MultipartActionRequest
See Also:   org.springframework.web.multipart.MultipartFile
See Also:   PortletRequestDataBinder.bindMultipartFiles
See Also:   PortletRequestDataBinder.bind(org.springframework.beans.PropertyValues)




closeNoCatch
public void closeNoCatch() throws PortletRequestBindingException(Code)
Treats errors as fatal. Use this method only if it's an error if the input isn't valid. This might be appropriate if all input is from dropdowns, for example.
throws:
  PortletRequestBindingException - subclass of PortletException on any binding problem



Fields inherited from org.springframework.web.bind.WebDataBinder
final public static String DEFAULT_FIELD_MARKER_PREFIX(Code)(Java Doc)

Methods inherited from org.springframework.web.bind.WebDataBinder
protected void bindMultipartFiles(Map multipartFiles, MutablePropertyValues mpvs)(Code)(Java Doc)
protected void checkFieldMarkers(MutablePropertyValues mpvs)(Code)(Java Doc)
protected void doBind(MutablePropertyValues mpvs)(Code)(Java Doc)
protected Object getEmptyValue(String field, Class fieldType)(Code)(Java Doc)
public String getFieldMarkerPrefix()(Code)(Java Doc)
public boolean isBindEmptyMultipartFiles()(Code)(Java Doc)
public void setBindEmptyMultipartFiles(boolean bindEmptyMultipartFiles)(Code)(Java Doc)
public void setFieldMarkerPrefix(String fieldMarkerPrefix)(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.