Well if memory usage isn't an issue then you can store your search criteria
on a form-bean with session scope, then the users last search (and
potentially results too - depending on how you have implemented it) will be
available wherever they access it from.

You can always use request.getSession().getAttribute("<your bean as defined
in struts-config">) to reference a form other than the one passed in via the
Perform method of your action. You need to check that it is not null
(remember it may not have been created) and hence you should also do a
setAttribute() to make sure it (or a new one) is put back to the session.

Then simply do a findForward on a forward which maps to another Action (i.e.
a .do path) which should do what you want it to.

HTHS

Ash

-----Original Message-----
From: Affan Qureshi [mailto:[EMAIL PROTECTED]]
Sent: 26 November 2002 09:28
To: struts-user
Subject: forwarding to Actions expecting ActionForm


I want to forward the request from my Action to another action which expects
an ActionForm instance for processing. But my current Action does not have
access to that Form. Can I instantiate an ActionForm and store it in the
request/session scope on the fly? 

I have a search page which displays results from where I can view details of
the results. On the details page if I click "Cancel" I want the user to come
back on the Search Results page but with the same results opened. 

Also if the user clicks on Search Tab from anywhere in the app I want the
specific (last) search results displayed.

Any ideas? Thanks a lot.

This e-mail and any attachment is for authorised use by the intended recipient(s) 
only.  It may contain proprietary material, confidential information and/or be subject 
to legal privilege.  It should not be copied, disclosed to, retained or used by, any 
other party.  If you are not an intended recipient then please promptly delete this 
e-mail and any attachment and all copies and inform the sender.  Thank you.

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

Reply via email to