struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stanl...@gmail.com
Subject Re: HowTo: transfer parameter between actions?
Date Tue, 05 Aug 2008 11:19:50 GMT
Consider chaining over redirect.  However, this does sort of hard wire your
flow!

On Tue, Aug 5, 2008 at 5:33 AM, holod <serega.sheypak@gmail.com> wrote:

>
> 1.I have action PrepareDictionaryAction
> it has field String dictionaryId and appropriate getter and setter.
> dictionaryid comes from previous jsp. (enter.jsp)
> action sends user to dictionary.jsp
>
> 2.dictionary jsp has hidden field <s:hidden name="dictionaryId"/>. So I
> will
> not be lost.
> 3.then through form submit user goes to WorkWithDictionaryAction.
> This action reads hidden field dictionaryId.
>
> I want on result="success" send user to PrepareDictionaryAction and I don't
> want to loose  dictionaryId
>
> This is struts.xml for "WorkWithDictionary:
> <action name="WorkWithDictionary"
> class="ibs.parliament.action.admin.WorkWithDictionaryAction">
>                <result name="success" type="redirect-action">
>                                PrepareDictionary
>                                /admin
>                        </result>
>                        <result name="input">/admin/dictionary.jsp</result>
>                </action>
>
> As you can  see on "success" user will go to PrepareDictionary. This action
> needs dictionaryId, but I is lost on WorkWithDictionary action, this
> parameter doesn't go forward.
>
> I would'nt like to use session, I would like to use something else. Does
> struts2 has special interceptor or result type for such tasks?
>
>
> --
> View this message in context:
> http://www.nabble.com/HowTo%3A-transfer-parameter-between-actions--tp18828496p18828496.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message