Hi,

I think I can put together a better implementation of what I was doing using
your two suggestions :

a)put the bean in the session scope
b)use an associated form with the prepare action

Thanks for your help!,

Jim

-----Original Message-----
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Friday, March 26, 2004 3:29 PM
To: Struts Users Mailing List
Subject: RE: newbie html-el question


> From: Bender, James [mailto:[EMAIL PROTECTED] 
> The user can click
> Search Attributes | Search Components | Search Templates
> I've provided html:link's like these respectively:
> doPrepareSearch.do?searchType=attribute |
> doPrepareSearch.do?searchType=component |
> doPrepareSearch.do?searchType=template

When the user clicks one of those, Struts will populate the form
associated with (I assume) PrepareSearchAction.  Does the mapping for
that have a 'name' attribute?  Does that Form have get/setSearchType
methods?

If you need to "remember" data, it's often easiest to put the Form bean
in session scope.  And you can associate one Form to several different
Actions if it makes sense for your application.  Some people will argue
against session scope, so you may want to consult the archives and see
if their reasons apply to your situation.

> so when they user lands on my form, I want to prepopulate the 
> search type based on what they chose.

That will just magically happen if you let Struts populate the form from
the query string parameter and then use the same Form bean when you
display your HTML form using the JSP.

Rather than confuse the issue, if you still need help, post your
struts-config.xml so we can see what you've got.  

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 


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


This e-mail transmission contains information that is confidential and may be 
privileged.   It is intended only for the addressee(s) named above. If you receive 
this e-mail in error, please do not read, copy or disseminate it in any manner. If you 
are not the intended recipient, any disclosure, copying, distribution or use of the 
contents of this information is prohibited. Please reply to the message immediately by 
informing the sender that the message was misdirected. After replying, please erase it 
from your computer system. Your assistance in correcting this error is appreciated.

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

Reply via email to