|
From: Nick L. <nic...@es...> - 2004-12-13 23:13:29
|
Comments inline. > > 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/JSR1 > 68/Home?showComments=true#comments > Below is a copy of the comment I posted there. > > Cheers, > Rainer > From a quick look this looks pretty promising. Does org.springframework.web.portlet.mvc.SimpleFormController replace org.springframework.web.portlet.SimplePortletFormController? If not then when should SimplePortletFormController be prefered? > > 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. Yes, I agree this would be a good change and I think it should be made. > 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. > > I'd like to think that might be the case but some people on the JSR committee seemed pretty opposed to this when it came up on the pluto-dev list. Nick |