thanks! -----Original Message----- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 11:06 AM To: 'Struts Users Mailing List' Subject: RE: Form Bean vs. State Bean
Your form bean will hold the state if you declare its scope="session" in struts-config, have a reset() method in the bean that just makes a call to super.reset(mapping, request), and synchronize your mutators and accessors). Otherwise, access the state of the form bean properties in the standard manner: String city = formBean.getCity(); -----Original Message----- From: Villegas, Courtney [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 1:55 PM I may just be confused. I thought that I needed a state bean to hold the address information in and that I needed a form bean to create the form on the jsp page. -----Original Message----- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 10:53 AM To: 'Struts Users Mailing List' Subject: RE: Form Bean vs. State Bean I'm not following you. Why do you have two beans that do the same thing? What is the program flow? Mark -----Original Message----- From: Villegas, Courtney [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 1:46 PM I have a state bean named addressLookup that has 3 variables (address, city, zipCode) and setters and getters for all 3 properties. I am now trying to write my form bean that I can access in my jsp. I have imported the addressLookup state bean and am now trying to determine how to use this. If I create 3 variables (address, city, zipCode) within the form bean and new setters and getters, all is dandy. However, I am trying to figure out how to reference those variables and properties in my state bean. Can anyone point me in the right direction? I looked on the Struts site and could only find a textual description of the difference between the state and form beans. Thanks Courtney -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>