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


org.springframework.web.portlet.mvc.Controller

All known Subclasses:   org.springframework.web.portlet.mvc.PortletModeNameViewController,  org.springframework.web.portlet.mvc.AbstractController,
Controller
public interface Controller (Code)
Base portlet Controller interface, representing a component that receives RenderRequest/RenderResponse and ActionRequest/ActionResponse like a Portlet but is able to participate in an MVC workflow.

Any implementation of the portlet Controller interface should be a reusable, threadsafe class, capable of handling multiple portlet requests throughout the lifecycle of an application. To be able to configure Controller(s) in an easy way, Controllers are usually JavaBeans.

Workflow:

After the DispatcherPortlet has received a request and has done its work to resolve locales, themes and suchlike, it tries to resolve a Controller to handle that request, using a org.springframework.web.portlet.HandlerMapping HandlerMapping . When a Controller has been found, the Controller.handleRenderRequest handleRenderRequest or Controller.handleActionRequest handleActionRequest method will be invoked, which is responsible for handling the actual request and - if applicable - returning an appropriate ModelAndView. So actually, these method are the main entrypoint for the org.springframework.web.portlet.DispatcherPortlet DispatcherPortlet which delegates requests to controllers. These method - and also this interface - should preferrably not be implemented by custom controllers directly, since abstract controllers also provided by this package already provide a lot of functionality for typical use cases in portlet applications. A few examples of those controllers: AbstractController AbstractController , AbstractCommandController AbstractCommandController , AbstractFormController AbstractFormController , SimpleFormController SimpleFormController .

So basically any direct implementation of the Controller interface just handles RenderRequests/ActionRequests and should return a ModelAndView, to be further used by the DispatcherPortlet. Any additional functionality such as optional validation, form handling, etc should be obtained through extending one of the abstract controller classes mentioned above.


author:
   William G. Thompson, Jr.
author:
   John A. Lewis
since:
   2.0
See Also:   SimpleControllerHandlerAdapter
See Also:   AbstractController
See Also:   AbstractCommandController
See Also:   AbstractFormController
See Also:   SimpleFormController
See Also:   org.springframework.context.ApplicationContextAware
See Also:   org.springframework.context.ResourceLoaderAware
See Also:   org.springframework.web.portlet.context.PortletContextAware




Method Summary
 voidhandleActionRequest(ActionRequest request, ActionResponse response)
     Process the action request.
 ModelAndViewhandleRenderRequest(RenderRequest request, RenderResponse response)
     Process the render request and return a ModelAndView object which the DispatcherPortlet will render.



Method Detail
handleActionRequest
void handleActionRequest(ActionRequest request, ActionResponse response) throws Exception(Code)
Process the action request. There is nothing to return.
Parameters:
  request - current portlet action request
Parameters:
  response - current portlet action response
throws:
  Exception - in case of errors



handleRenderRequest
ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) throws Exception(Code)
Process the render request and return a ModelAndView object which the DispatcherPortlet will render. A null return value is not an error: It indicates that this object completed request processing itself, thus there is no ModelAndView to render.
Parameters:
  request - current portlet render request
Parameters:
  response - current portlet render response a ModelAndView to render, or null if handled directly
throws:
  Exception - in case of errors



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