portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: [Bug 18865] - [Enhancement] MVC Portlet Action Life Cycle
Date Mon, 14 Apr 2003 19:07:31 GMT

On Monday, April 14, 2003, at 09:51  AM, Weaver, Scott wrote:

>> Is there documentation anywhere on how to use the new MVC portlets?
>> Looking at PortletActionEvent, there is a method "fireEvent" that has
>> no java docs on how it works ( alluding to a message on the other dev
>> list ;-)
>
> Ouch!  I already I said was no angel when it comes to documentation, 
> but it does say "Convenience method for firing portlet events." ;)

hey now, if we can dish it out, we can take it too ;-)
(note: you have to be on another mailing list that Scott and I are 
members of to appreciate this joke)

yes, but the params are still a mystery to me....

>
>> Im walking thru the code, trying to figure out how this all works.
>> It seems that the MVC is trying to call the action from within
>> BuildNormalContext, which is too late IMO.
>> The action phase should occur before any rendering starts.
>> Anyway, if we can get a portlet from within an action event, that 
>> would
>> be a great improvement, even though the phasing is out of sync.
>
> The action is called from the buildContent() method which is invoked 
> by the standard getContent() method defined in the GenericMVCPortlet, 
> not within the buildNormalContext() of the action.  This is done prior 
> to the view processor's handling of the appropriate template, so the 
> action phase is completed prior to rendering, with the context fully 
> populated.

Don't get me wrong . I really welcome the MVC, It just doesn't seem 
right to have the getContent() method is invoking actions.
Its good that the action phase completes for this particular portlet 
before the render phase, but i would prefer that it completes before 
all portlet's render phases.


> The only way this fails is if the action is not being invoked directly 
> by the GenericMVCPortlet, i.e. you are passing in an "action" 
> parameter either through a url or form field and not relying on the 
> value provided within the registry definition.  Which I have a feeling 
> is what is happening in your case, am I correct?
>
Well considering I have lots of actions written prior to 
GenericMVCPortlet, would be safe to say that they will all fail...
This leaves at them at the exact state they were in before MVC portlet, 
they can't access the portlet.
Could you quickly describe how I should port my actions so that they 
work correctly in MVC?

> I'll definitely try and whip up some documentation on the MVC portlets.
>
+1

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message