I have a simple form show below:

<jsp:useBean id="tranDefForm"
class="com.company.web.forms.TranDefForm"/>        

<form action='/web/tranDefDetail.do' method='POST'>
  <html:hidden name="tranDefForm" property="id"/>
  <html:text name="tranDef" property="name" />
  <html:submit property="method">Save</html:submit>
  <html:submit property="method">Delete</html:submit>
</form>

This is how I have defined it in the struts-config file

<form-bean name="TranDefForm" type="com.company.we
b.forms.TranDefForm" />

<action path="/tranDefDetail" parameter="method"
type="com.company.web.actions.TranDefActions" name="TranDefForm"
validate="true">
  <forward name="success" path="/admin/tran-def-detail.jsp"
redirect="false" />
  <forward name="failure" path="/admin/tran-def-detail.jsp"
redirect="false" />
</action>

When I load the page it seems to work fine and call the appropriate
setter and getter methods in my ActionForm class. But when I click on
Save to submit the form, it bypasses the setting of the ActionForm
properties and goes straight to the execute method of my action class
with the "ActionForm form" parameter passed as null.

What am I doing wrong???

-Lili


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to