You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by matt kampmeier <mk...@wi.rr.com> on 2003/05/27 19:06:48 UTC

URI Redirect in VelocityPortletAction

I am a rookie JetSpeed developer (and loving it) and I've got a basic
URI Redirect question.  Can I perform a URI Redirect from a
buildNormalContext method within an Action class that extends
VelocityPortletAction?  I tried calling the
rundata.setRedirectURI("<target URI">) in the buildNormalContext  method
but it did not work - it was ignored.  When the rundata.setRedirectURI()
method is called as a result of an Action Event (e.g. doUpdate) in the
same Action class it appears to work fine.  

 

I'm still working out the understanding of the difference between
rendering a page and executing an action/event.  In the
buildNormalContext method is it too late in the game to redirect the URI
because I'm in the page rendering phase?   Can I only do the redirect
through an action/event call (like what a form button would submit)?

 

I am working with two panes, a company pane and an employee pane.  The
company pane has two portlets, a company browser and a company details
form.  The employee pane also has two portlets, an employee browser and
an employee details form.  Editing a company row within the company pane
and editing an employee row within the employee pane works fine.  What I
would like to do is add a "Select" link to each row of the company
browser list and when selected, the CompanyAction class would set the
current company in the user's session and then redirect control to the
employee pane where the current list of employees will be displayed for
the selected company.   I have the Select link working to invoke the
CompanyAction class with js_mode=Select, but the
rundata.setRedirectURI() call within the buildNormalContext() method of
the CompanyAction class does not take me to the employees pane - I'm
left in the company pane.  I'm using the unique paneId which works fine
if I try to do this within the doUpdate method.  Any suggestions on
linking between these two panes? 

 

Thanks in advance,

Matt