Have the "Add Address" button submit to a different method - say, addAddress() on personSave action itself.
ie <s:submit action="personSave" *method="addAddress"*> For suppressing validation for this method alone, but allowing for other methods on the action, use the wildcard action mappings -- see earlier posts for the same. Thanks, Joseph On Dec 7, 2007 7:49 AM, Jeancarlo <[EMAIL PROTECTED]> wrote: > Hello, > > I'm new on struts 2, and I'm using just struts 2 right now (no ajax), and > the system I'm developing have a client and address, and I want to do > something like the folowing: > > <s:form id="personForm" action="personSave" method="post" validate="true"> > > <s:textfield label="Name" name="firstName" /> > > <s:submit value="Save" /> > <s:submit id="addressView" action="addressView"/ value="Add > addresses"> > </s:form> > > > What I want to do is something like a partial form submission: above is > the > first view, and the form has a validation: the user must inform all fields > before he can save, including the addresses which is in another view (the > add addresses button), so, he can go directly to the 'add addresses' first > (without fill the 'name' input), and when he clicks on the 'add addresses' > button the validation complain about required fields. As you see I've > tried > to force to use another action in the 'add address' button, but it seams > struts is using the action form to do the validation. > > This might be a silly example, but the complete one is more complex, so > what > I need is bypass the validation (like a wizard submission) and, at the > same > time, sending the information to the action, so I can get them when the > user > come back to the first view. Any suggestions? Is there another way to do > that, like whit ajax (dojo) or tabbed panel maybe? Any example? > > Best regards. > Jeancarlo. >