I'm investigating using Struts. I can hydrate a ActionForm and display the information to the screen. But when I try to save the info and validate it the values in the ActionForm are null. It's my undersatnding that Struts will populate the ActionForm with the new values but my original values aren't even there. Why? Here's a listing of my code: Struts Config: <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> <struts-config> <!-- ========== Form Bean Definitions ============ --> <form-beans> <form-bean name="login" type="test.struts.LoginForm" /> <form-bean name="addressform" type="struts.formbean.AddressForm" /> </form-beans> <!-- ========== Global Forward Definitions ========= --> <global-forwards> </global-forwards>
I'm having a little trouble following this based on your description. It would be easier to follow the code if you could post it using the UBB Code Code tags. Could you give us a little insight as to what the flow is and what results you expect. My first reaction is to say to specify a scope of session for the form, but without some furhter clarification I wouldn't want to say for sure.
Normally you'd set the Form Bean's default values in its reset() method. Then, if you're loading in persistent data, you can overlay the defaults in the Action processor. Here's a working demo: http://www.mousetech.com/strutsdemo/index.jsp The page that will help most is the one you get when you click on "Create new Category".
Customer surveys are for companies who didn't pay proper attention to begin with.