portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphaƫl Luta <raphael.l...@networks.groupvu.com>
Subject Re: cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/portaltoolkit JetspeedPortalToolkitService.java
Date Tue, 28 Aug 2001 17:50:52 GMT
David Sean Taylor wrote:

>>On my build, the templates show up correctly but the actions need to be
>>adapted not to use the PATH_PANEL_KEY constant but rely on
>>PanedPortletController.getParameterName() or simply use directly
>>a PortletTemplateLink object instead of DynamicURI.
>>
> 
> Thanks, without any modification on my part, it works fairly well except for
> a few situations, basically whenever I need to redirect to another pane.
> Like on error validation. In that case we need to get the correct panel key,
> which involves getting the portlet.
> 
> In a VelocityPortletAction, I don't see how to get the portlet associated
> with the portlet action.
> If you look at VelocityPortlet, it put the portlet and even the jlink into
> the context:
> 
>     public ConcreteElement getContent( RunData rundata )
>     {
>         System.out.println("in getContent for velcoity portlet");
>         // create a blank context and with all the global application
>         // Pull Tools inside
>         Context context = TurbineVelocity.getContext();
>         context.put( "data", rundata );
>         context.put( "portlet", this );
> ...
>         // Put the request and session based contexts
>         TurbinePull.populateContext(context, rundata);
> 
>         context.put( "jlink", new PortletTemplateLink(rundata,this) );
> 
> (aside: this is making me wonder, what happens if there are 2
> VelocityPortlets on a psml page)
> 
> Then looking at the stack trace going into the insert action for a user:
> 
> 
> As you can see, the portlet's getContent is never called on an action, so
> the portlet (or jlink) never gets set.
> How do you know which portlet is associated with a portlet action?
> 


It all depends how you specify your action:
- if you use an "action" parameter in your form, you use default Turbine
   action behavior and thus you cannot get any context information unless
   you explicitely pass it in the session or the form request.
   However this action will be executed before any layout happens and so you can
   freely modify any parameter you want
- if you don't specify the action paramater, VelocityPortlet will implicitely
   call your associated VelocityPortletAction, using any specified ActionEvent
   parameters in your request. Since this is done at Portlet rendering, you'll
   have a portlet object in your context but you won't be able to update contexual
   information like pane, etc...

If you want both, you need to use the new Portlet API :P

--
Raphael Luta - raphael.luta@networks.groupvu.com
Vivendi Universal Networks - Paris


---------------------------------------------------------------------
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