|
From: Rainer S. <Rai...@ab...> - 2004-12-13 09:19:29
|
Aloha! I sent a patch, but meanwhile I've done more. I've attached a zip file containing my changed and added files to confluence: http://opensource.atlassian.com/confluence/spring/display/JSR168/Home?showComments=true#comments Below is a copy of the comment I posted there. Cheers, Rainer This zip contains some (many) changes to the CVS code. Mainly the form handling code is affected, trying to build a form controller hierarchy similiar to the servlet tree. A new controller type is ActionFormController for forms requiring processing in the action phase, e.g. to call ActionResponse.sendRedirect(String), ActionResponse.setPortletMode(PortletMode), or link ActionResponse.setWindowState(WindowState). A controller extending this is RedirectFormController. Another new class is ParameterControllerMapping to map controllers by a given request parameter, and ParameterMappingInterceptor to intercept those parameters in ActionRequests and forward it to the according RenderRequest. The code works for me but needs some more testing and documentation. Generally it might be necessary to change some method signatures in base classes from using ActionRequest/Response or RenderRequest/Response to use the more general PortletRequest/Response. Then implementing controllers have more freedom to choose wether the processing will take place mainly in the render phase (as proposed in the original code) or in the action phase (as implementd by ActionFormController). After implementing a few portlets I can imagine the need for portlets doing more work in the action phase and forward the result to the render phase as parameter or even in the portlet session. In addition the next version of the portlet specification might relax the communication constraints between action and render phases (e.g. by allowing to set RenderReuqest attributes). The proposed changes will make it easier for implementing controllers to implement those extensions. |