> De : David Sean Taylor [mailto:[EMAIL PROTECTED]]
> 
> On Thursday, January 9, 2003, at 12:01  PM, Christophe wrote:
> 
> > The method rundata.setRedirectURI doesn't work in my 
> velocity action 
> > portlet. I don't understand why.
> > Like for the security management code, I want point to another pane 
> > (from a browser portlet to a form portlet).
> > Which condition is needed to run this method properly ?
> >
> > here is my code :
> >                 ....
> >                 duri.addPathInfo(OJBConstants.PANE_NAME, 
> > OJBConstants.PANEID_STRATEGY_UPDATE);
> >                 duri.addPathInfo(OJBConstants.PARAM_MSGID, 
> > OJBConstants.MID_INVALID_ENTITY_NAME);
> >                 rundata.setRedirectURI(duri.toString());
> >
> > Even a simple : rundata.setRedirectURI(http://jakarta.apache.org);  
> > doesn't work. Why ?
> >
> By the time the Velocity action is called, Its too late in 
> the Turbine 
> pipeline.
> The Velocity action cannot redirect, it is not a true Turbine action.
> In order to do so, you must use a 'normal' Turbine action.
> 

Just to mitigate this, VelocityPortletActions *are* real Turbine actions 
but they currently have 2 scope of invocations:

- the Turbine action scope where Action events are processed.
  In these action events, you should be able to use any redirect
  you want

- the VelocityPortlet scope, where the portlet delegates to the Action
  its context generation (ie the buildXXXXContext methods).

  In these methods, you *can't* redirect anymore the complete portal 
  because you have no control on what other processing may have already
  happened in other portlets, and in any case you're just asked to render
  your portlet content in your allocated screen real estate.

Bottom line:
Global redirects should work in action events, ie when reacting to a user
interaction but not in the standard "content rendering" methods where you're
only allowed to redirect to another portlet template.

If you search the archives, I think I sent a few weeks/months ago a 
detailed explanation on how these damn actions are invoked.

Hope this helps,

--
Rapha�l Luta - [EMAIL PROTECTED]
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to