You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bruno <br...@gmail.com> on 2010/04/04 21:57:41 UTC
Chain Result with parameters.
I'm trying to make a chain action result with a parameter.
However, the chain action's parameter is being set as null. I've already
checked the fileServer object and it's oid, and they aren't null. So I
believe the problem is on the chain.
Any sugestions?
Thanks!
<action name="FileServer_*" class="fileServerAction" method="{1}">
<result name="main" type="chain">/Server_main</result>
<result name="input">/jsp/fileServer-edit.jsp</result>
<result name="source" type="chain">
<param name="actionName">FileSource_main</param>
<param name="namespace">/</param>
<param name="parse">true</param>
<param name="serveroid">${fileServer.oid}</param>
</result>
</action>
--
Bruno Morelli Vargas
Mail: brunomv@gmail.com
Msn: brunom_@hotmail.com
Icq: 165055101
Skype: morellibmv
Re: Chain Result with parameters.
Posted by Bruno <br...@gmail.com>.
Thanks Okan, but as I've wrote on my e-mail, that's exactly what I did, but,
still, doesn't work.
On Mon, Apr 5, 2010 at 5:52 AM, Okan Özeren <ok...@gmail.com> wrote:
> Hi,
>
> You will be able to pass a parameter with using this syntax:
>
> * <result type="chain">
> <param name="actionName">collect-address</param>
> <param name="userId">${userId}</param>
> </result>*
>
> The ${userId} syntax will call getUserId on your action and pass parameter.
> I didn't try this but i hope it'll run successfully.
>
> I hope, this will help to you,
>
> Okan Özeren.
>
> On Sun, Apr 4, 2010 at 10:57 PM, Bruno <br...@gmail.com> wrote:
>
> > I'm trying to make a chain action result with a parameter.
> >
> > However, the chain action's parameter is being set as null. I've already
> > checked the fileServer object and it's oid, and they aren't null. So I
> > believe the problem is on the chain.
> >
> > Any sugestions?
> >
> > Thanks!
> >
> >
> >
> > <action name="FileServer_*" class="fileServerAction" method="{1}">
> > <result name="main" type="chain">/Server_main</result>
> > <result name="input">/jsp/fileServer-edit.jsp</result>
> > <result name="source" type="chain">
> > <param name="actionName">FileSource_main</param>
> > <param name="namespace">/</param>
> > <param name="parse">true</param>
> > <param name="serveroid">${fileServer.oid}</param>
> > </result>
> > </action>
> >
> > --
> > Bruno Morelli Vargas
> > Mail: brunomv@gmail.com
> > Msn: brunom_@hotmail.com
> > Icq: 165055101
> > Skype: morellibmv
> >
>
--
Bruno Morelli Vargas
Mail: brunomv@gmail.com
Msn: brunom_@hotmail.com
Icq: 165055101
Skype: morellibmv
Re: Chain Result with parameters.
Posted by Okan Özeren <ok...@gmail.com>.
Hi,
You will be able to pass a parameter with using this syntax:
* <result type="chain">
<param name="actionName">collect-address</param>
<param name="userId">${userId}</param>
</result>*
The ${userId} syntax will call getUserId on your action and pass parameter.
I didn't try this but i hope it'll run successfully.
I hope, this will help to you,
Okan Özeren.
On Sun, Apr 4, 2010 at 10:57 PM, Bruno <br...@gmail.com> wrote:
> I'm trying to make a chain action result with a parameter.
>
> However, the chain action's parameter is being set as null. I've already
> checked the fileServer object and it's oid, and they aren't null. So I
> believe the problem is on the chain.
>
> Any sugestions?
>
> Thanks!
>
>
>
> <action name="FileServer_*" class="fileServerAction" method="{1}">
> <result name="main" type="chain">/Server_main</result>
> <result name="input">/jsp/fileServer-edit.jsp</result>
> <result name="source" type="chain">
> <param name="actionName">FileSource_main</param>
> <param name="namespace">/</param>
> <param name="parse">true</param>
> <param name="serveroid">${fileServer.oid}</param>
> </result>
> </action>
>
> --
> Bruno Morelli Vargas
> Mail: brunomv@gmail.com
> Msn: brunom_@hotmail.com
> Icq: 165055101
> Skype: morellibmv
>