|
From: William G. T. Jr. <wg...@ru...> - 2004-08-17 15:28:48
|
Nick Lothian wrote: > If I have a link to a portlet action that also changes the view mode, then > the view mode will be changed before the handleRequest method is called. > This means the handleRequest won't be called on the controller I would > expect. > > EG: > I have two PortletController's - one for edit mode and one for view mode. In > the JSP for the edit mode I have a link to: > > <portlet:actionURL portletMode="view" /> > > When I execute that link, I was expecting the handleRequest method in my > edit portlet controller to be called (since I'm in edit mode and I'm > executing an action). > > What happens is that the mode change is processed first (ie, the portlet > changes to view mode) and then the handleRequest method in my view portlet > controller is executed. > > Is this a deliberate design decision? If not is it possible to implement it > differently - or am in the minority about finding that confusing? > We should probably follow whatever the spec says with regards to the portlet tab lib. Is this behavior inconsisent with the spec? Mapping from PortletMode to Controller might also not be the best choice. It was the simplest thing I could do to get the prototype working. We probably need something like a PortletSession or Request parameter for Controller mappings since the URL is not available. later. Bill |