Hi Jonny,

I have id properties on actions all over my application.

I also have several actions that do a redirect to id. I think there's
something wrong with either your environment or your action that's causing
the issue.

What exactly happens when it doesn't work?

Mark 
The guy who wrote the article.


On 6/25/08 11:29 AM, "Jonny Cavell" <[EMAIL PROTECTED]> wrote:

> 
> This  http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect article
> about post and redirect in struts 2  explains how to redirect to a
> dynamically evaluated action.
> 
> However, if I use a param which references an action property called "id",
> it doesn't work. 
> 
> &lt;result type="redirect-action"&gt;
>   &lt;param name="actionName"&gt;${redirectActionName}&lt;/param&gt;
>   &lt;param name="namespace"&gt;/admin/holidays&lt;/param&gt;
>   &lt;param name="parse"&gt;true&lt;/param&gt;
>   &lt;param name="id"&gt;${id}&lt;/param&gt;
> &lt;/result&gt;
> 
> But when I changed the property (and its getter and setter) to be called
> "aid", it works OK:
> &lt;result type="redirect-action"&gt;
>   .. as above...
>   ..............
>   &lt;param name="id"&gt;${aid}&lt;/param&gt;
> &lt;/result&gt;
> 
> 
> Also (possibly unrelated), again with a property called id on my action,
> when I use the &lt;s:url&gt; tag, it automatically adds the current value of
> the action's id to the URL even if I don't want it to. The docs don't
> mention that this should happen (it's annoying).
> 
> It seems as if naming an action property id should be avoided...


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

Reply via email to