Well, if I recall from your original post you only wanted to validate the fields on the current page only. Validator provides support for a page attribute that you can use for wizard-style forms. Validator will use that attribute to validate form fields on the current page and any previous pages. The reason it does the previous page is primarily for security since you cannot guarantee that form properties were set from the intended page.

- Bill Siggelkow

Langdon Stevenson wrote:
Hi Bill

Thanks for your suggestion. I have switched to ValidatorActionForm for my validation and now get the desired result (validation of only the fields that appear on the specific page). So problem solved!

I am curious though about your interpretation of "wizard style". The form is indeed wizard like, would you do things differently because of that?

Langdon


Bill Siggelkow wrote:

If I understand you correctly, you are using a form for multiple-pages but not in a wizard fashion. The best way to do this is to use path-mapping for validator -- in this case your form extends
ValidatorActionForm (or DynaValidatorActionForm) and you specify the path to the action for the form name in the validation.xml ...


<form name="/Foo/Bar">

  ... for this action, only these fields will be validated...

</form>

Bill Siggelkow

Langdon Stevenson wrote:

Hi

I have a multi-page form (about 8 pages total) that take just a few fields per page that I am implementing in Struts (this is my first Struts project).


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



Reply via email to