struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <jakartau...@yahoo.com>
Subject RE: Struts, Search Page, Help!!!
Date Wed, 21 Jan 2004 19:15:19 GMT
Can you send your entire html form?

--- "Matthew J. Vincent" <vincent@cs.usm.maine.edu> wrote:
> Yes.
> 
> <html-el:text property="strainName"/>
> 
> etc.
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Hubert Rabago [mailto:jakartauser@yahoo.com]
> Sent: Wednesday, January 21, 2004 2:05 PM
> To: Struts Users Mailing List
> Subject: RE: Struts, Search Page, Help!!!
> 
> 
> Are you using struts html tags to write the rest of your form?
> 
> --- "Matthew J. Vincent" <vincent@cs.usm.maine.edu> wrote:
> > I'm sorry I am so lost today!
> >
> > Now...here is the problem I am having.
> >
> > When a user goes to http://localhost:8888/search.do
> >
> > From my understanding this will call my SearchAction class as specified in
> > my struts-config.xml file:
> >
> >    <form-beans>
> >       <form-bean name="strainSearchForm"
> >                  type="StrainSearchForm"/>
> >    </form-beans>
> >
> >    <action-mappings>
> >       <action path="/search"
> >               type="SearchAction"
> >               scope="session">
> >          <forward name="success" path="/search.jsp"/>
> >          <forward name="failure" path="/appError.jsp"/>
> >       </action>
> >
> >       <action path = "/searchResults"
> >               type = "SearchResultsAction"
> >               name = "strainSearchForm"
> >               validate = "true"
> >               input = "/search.do">
> >          <forward name="success" path="/searchResults.jsp"/>
> >          <forward name="failure" path="/search.do"/>
> >          <forward name="error" path="/appError.jsp"/>
> >       </action>
> >    </action-mappings>
> >
> > and if all is well, forward to search.jsp to diplay my search screen (not
> my
> > search results).
> >
> > From the search screen, when the user clicks Search searchResults.do (not
> > search.do) is invoked, strainSearchForm.validate() gets called and then my
> > SearchResultsAction.execute() method.  If the strainSearchForm.validate()
> > returns an error, the error is displayed on the screen, but the values
> that
> > the user types are lost so they have to retype in everything.  How do I
> get
> > the values to already be filled in?  If I put them in session scope, will
> I
> > have to clear the values later (when they start a new search)?  Also, I
> > would like to do the same thing if no results are returned in my
> > SearchResultsAction class - how do I do this as well?  (On a side note, my
> > strainSearchForm.reste() method is empty - should it be?) Is my config
> file
> > wrong?  Am I not doing something correctly?
> >
> > Again, should I just have 1 action class or is having multiple action
> > classes like this ok?  What is the best practice or approach here?
> >
> > Matt
> >
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message