Subject: Re: How do I navigate from one subApp to another in Struts1.1?
From: Serge Shikov <[EMAIL PROTECTED]>
 ===
Craig R. McClanahan wrote:
> 
> On Sat, 27 Jul 2002, Struts Newsgroup wrote:
> 
> 
>>Date: Sat, 27 Jul 2002 22:40:02 -0700
>>From: Struts Newsgroup <[EMAIL PROTECTED]>
>>Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Subject: Re: How do I navigate from one subApp to another in Struts1.1?
>>
>>Subject: Re: How do I navigate from one subApp to another in Struts1.1?
>>From: Serge Shikov <[EMAIL PROTECTED]>
>> ===
>>Craig R. McClanahan wrote:
>>
>>>>>The tempting way to do this is to do something like
>>>>>
>>>>> <html:link forward="foo"/>
>>>>>
>>>>>and mark the "foo" forward as being context relative.  However, this will
>>>>>ONLY work if you are switching to the default sub-app, because you'd be
>>>>>bypassing the controller servlet where sub-app selection is performed.
>>>>>
>>>>>The better way is to make your link go through an <action> that uses the
>>>>>standard SwitchAction class.  This wants you to send along the application
>>>>>prefix of the sub-app you want to switch to, as well as a resource in that
>>>>>sub-app to forward to after the switch.
>>>>
>>Craig, I have another related question. This way I can switch from
>>sub-app (A) to another sub-app (B). This is something like low-level
>>goto in programming languages. What about call? How can I return later
>>from B to A, to the point "below" call? For example, I have
>>master-detail form in my application. How can I call from master form
>>(one sub-application, really not one page but many pages and actions) to
>>detail form (other sub-app, many pages and actions too), edit detail
>>item (or create another one), and then return to the same master item?
>>How this could be done?
>>
> 
> 
> Using the SwitchAction approach is definitely like a GO-TO, because there
> is no stack being maintained of where you came from.  So, why can't you
> just use the SwitchAction again to go back?
Because I newer know, where I come from. It's true for any application, 
in my opinion. I know all possible entry points (actions, for struts 
case, from struts config, or subprograms in procedural language), but I 
don't know return points.

What is return point for struts? What data should I save in call stack 
(somethere in session) for correct return? Obviously, I need current 
sub-app name, current action (could be get from mapping), and may be 
current request parameters. Something else?


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

Reply via email to