RE: Parameterised redirect?
"Kevin O'Neill" <[email protected]>
| Newsgroups | gmane.comp.web.maverick.general |
|---|---|
| Organization | rocketred pty ltd |
| Message-ID | <[email protected]> |
On Mon, 05 May 2003 17:52:32 -0700, Schnitzer, Jeff wrote:
> For view type "redirect", calling setParam("project", "7") on the
> controller context will do it. If you're using a Throwaway-derived
> controller:
>
> this.getCtx().setParam("project", "7");
worked like a charm, though it does leave me with another small problem
though :).
<command name="projects/do-add-member">
<controller class="au.edu.curriculum.esit.web.ActionController">
<param name="class"
value="au.edu.curriculum.esit.commands.actions.project.AddMember"/>
</controller>
<view name="success" type="redirect" path="view.m"/> <view name="error"
path="add-member.vm">
<transform type="xslt" path="WEB-INF/xslt/style.xslt"/>
</view>
</command>
The redirected URL has
view.m?class=au.edu.curriculum.esit.commands.actions.project.AddMember
which although not harmful (I never read the class information from the
query string), it is a little ugly.
I was thinking about adding an optional parameter to the redirect that if
present effected it's query string so that parameters I use to configure
the maverick action don't show in the query string. Thoughts?
-k.
--
If you don't test then your code is only a collection of bugs which
apparently behave like a working program.
Website: http://www.rocketred.com.au/blogs/kevin/
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
[INVALID FOOTER]