Dear Wiki user, You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.
The following page has been changed by SimonMaticLangford: http://wiki.apache.org/struts/StrutsMultipleActionForms ------------------------------------------------------------------------------ ==== Prepopulate ==== - To alleviate the struts-config explosion, this can be approached in another way. Instead of using a parameter to do the switch, do it automatically at page load. If you make a couple of 'tweaks' to the RequestProcessor to make the "processMapping" and "processActionCreate" methods public, and another 'tweak' to the ActionServlet to allow access to the RequestProcessor through an accessor. The html:form knows where it is going to submit, and using these changes can get the action mapping and thus the "Action" that will be invoked when the form is submitted. You can create an interface which defines a prePopulate method, and if your action implements this interface then call it: + To alleviate the struts-config explosion, this can be approached in another way. Instead of using a parameter to do the switch, do it automatically at page load. If you make a couple of 'tweaks' to the Request``Processor to make the "processMapping" and "processActionCreate" methods public, and another 'tweak' to the Action``Servlet to allow access to the Request``Processor through an accessor. The html:form knows where it is going to submit, and using these changes can get the action mapping and thus the "Action" that will be invoked when the form is submitted. You can create an interface which defines a prePopulate method, and if your action implements this interface then call it: {{{ ActionMapping mapping = requestProcessor.processMapping(request, response, action);