| Author |
Struts ActionForm does not reset, previous ActionForm data displayed
|
Lisa Lang
Greenhorn
Joined: Oct 13, 2004
Posts: 2
|
|
I've been working with Struts for several months now but I'm stumped. I've been able to create Actions that retrieve data (using Torque) and populate an ActionForm before forwarding on to the .jsp for display. However, I am trying to provide a means to add a new object and no matter what I put in my NewAction the data from the previously populated ActionForm re-appears! struts-config.xml <action attribute="WSAForm" input="/pages/WSA.jsp" name="WSAForm" path="/NewWSA" type="com.qualcomm.sa.struts.action.NewWSAAction" validate="false" scope="request"> <forward name="success" path="/pages/WSA.jsp" /> <forward name="error" path="/pages/Error.jsp?from=NewWSA" /> </action> <action attribute="WSAForm" input="/pages/WSA.jsp" name="WSAForm" path="/RetrieveWSA" type="com.qualcomm.sa.struts.action.RetrieveWSAAction" validate="false"> <forward name="success" path="/pages/WSA.jsp" /> <forward name="error" path="/pages/Error.jsp?from=RetrieveWSA" /> </action> from NewWSAAction.execute() log.debug("Entered NewWSAAction.execute()"); WSAForm wsaForm = (WSAForm) form; wsaForm.reset(mapping, req); return (mapping.findForward("success")); // NOTES: // 1) The log statement does appear // 2) I've even tried explicitly resetting each attribute as follows: // wsaForm.setSvc_name( "" ); from WSA.jsp <TD align="right" class="fieldLabel" colSpan="2">Service Name</TD> <TD class="fieldEntry"> <html:text property="svc_name" size="50" maxlength="50" /> </TD> Even if I restart the app it re-displays the data from the last populated wsaForm! I've got scope set to "request" in struts-config and I'm calling wsaForm.reset() in my Action yet it appears to be getting this data from somewhere else! Any ideas?
|
 |
 |
|
|
subject: Struts ActionForm does not reset, previous ActionForm data displayed
|
|
|