----- Original Message ----- 
From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, August 11, 2003 10:49 AM
Subject: RE: LookupDispatchAction


> Nalini wrote:
> > Alongside the 'school address' field I have a submit button, 'Find
School'
> that allows a user to enter part of the
> > school name or address and hit this 'FindSchool' button which then goes
> off to another page (selectSchool.jsp)
> > that displays a list of matching schools.  The user then clicks on their
> chosen school on selectSchool.jsp and is
> > then returned to the RegisterForm with the 'school name' and 'school
> address' fields populated.
>
> I have exactly this flow in my own webapp, with the added complication
that
> the "Find School" part is used from multiple other forms.
>
> I use LDA for the editWhatever actions (Registration, in your case).  Then
I
> "cheat" by sticking the name of the "editWhatever" action into the session
> or request so I can use it to construct the "Go back where you came from"
> ActionForward.
>
> My biggest problem was that there is no "go back where you came from"
> inherent in the framework-- everything is forward-looking, do this, then
go
> forward to one of many places.

Yes. That is a recognized issue in Struts. I have discussed this issue
sometime
ago. A *fix* to the problem is to use the *.do in the input attribute
of the action mapping, something like the following one:

 <action
 path="/FooCRUDOperation"
 type="com.myco.editors.FooAction"
 name="FooForm"
 scope="request"
 input="/FooCRUDInput.do"
 parameter="dispatchAction">
 <forward name="edit" path=".editor.foo.Update"/>
 <forward name="add"   path=".editor.fooCreate"/>
 <forward name="view"   path=".editor.fooView"/>
 <forward name="top"   path=".editor.fooTop"/>
 </action>

You have to write one additional class for the /FooCRUDInput.do
action mapping in which you forward according to the request
parameter "dispatchAction".

>
> -- 
> Wendy Smoak
> Arizona State University
>
>

Jing
Netspread Carrier
http://www.netspread.com



----------------------------------------------------------------------------
----


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


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

Reply via email to