Hello,

I found this problem when trying to redirect from VelocityPortletAction to different pages:

- if I specify my action in template like this

<form name="myform" action="$jslink.setAction("portlets. MyActionClass")">
...
<input type="submit" value="eventSubmit_doSomething">
</form>


I'm able to change result page by using Rundata.setRedirectURI(), but VelocityContext is not initialised, which is a major issue for me, as I'm using Intake tool and I need to access it [maybe there is other way to access this tool than 'itool = (IntakeTool) context.get ("intake");' ?]

- if I do not specify action in URL (and use the action specified in registry), I'm able to access VelocityContext, but I'm unable to do any redirect; this I found in mail list archive:


If you attempting a redirect, make sure the following is setup correctly:

In your portlet template, the form's action should look something like this

<!--Assuming Velocity-->
<form action="$jslink.setAction("myAction")">
<input type="submit" name="eventSubmit_doTest" value="Submit"/>
</form>


What happens is that Turbine will intercept the action and call the event because the action is listed in the url. This happens before any redering starts to take place. Otherwise, the action will be called for each portlet during the render phase, which is too late to redirect turbine.


Jeremy Ford


Is there a way to solve that?


TIA,
--
Martin Dostal


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



Reply via email to