> From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] > However, if I select a value, press submit, and there is an > error...the > selected value is not "saved" and pre-selected. Actually, none of the > values are saved. My SearchForm has the appropriate getters > and setters. > How do I accomplish this? HELP AGAIN! :) > Is my struts-config.xml file setup incorrectly? I was unsure of the > <forward name="failure" path="/search.do"/> line below. > > <action-mappings> > <action path="/search" > type="SearchAction" > scope="session"> > <forward name="success" path="/search.jsp"/> > <forward name="failure" path="/appError.jsp"/> > </action>
How is this even working with no 'name' attribute for the <action>? I think that's why you're not seeing the values... search.do does not have a form bean associated with it. > <forward name="failure" path="/search.do"/> I think the purists will complain about "Action Chaining" but I have a couple places in my where I display a list of search results, and I have the same thing. It works, it's just something to avoid if you can. Actually in this case I'm not sure why you need two actions. If you just have a Search action, you should be able to detect whether you need to display the form, or display the results. Could be as simple as having a hidden field on the form, and if that's present, you know the form was submitted and you forward to searchResults.jsp. DispatchAction or LookupDispatchAction might be helpful. Instead of multiple Actions, you have multiple methods in one Action, and use a request parameter (with LDA) to decide which method to use. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]