Ruben,

After many trials, I finally got the page attribute to work.  This is what I did.

I am using a DynaValidatorForm so I created my own Form class and extended 
DynaValidatorForm.  I only have one method in
there; the validator method.

Here is a copy of my source code....

public class ReviewRecordForm extends DynaValidatorForm {

  public ActionErrors validate(ActionMapping mapping,
                               HttpServletRequest request) {

    String screen = request.getParameter("page");

    //set page property in form
    this.setPage(Integer.parseInt(request.getParameter("page")));

    //Call the Validator Framework
    ActionErrors errors = super.validate(mapping,request);

    return errors;

  }
}

In my validation.xml file, I added the page="X" attribute to the field property line.  
(Where "X" is the page number).  Here
is a sample from my validation.xml file:

       <field property="phaseSelected" depends="required,isNotSelectOption" page="0">
          <arg0 key="label.revRec.phase"/>
       </field>

       <field property="dispositionSelected" depends="required,isNotSelectOption" 
page="3">
          <arg0 key="label.revRec.disposition"/>
       </field>

I wrote the isNotSelectOption validation rule.

I hope this helps....

Natalie

Ruben Carvalho wrote:

> Did anyone work with Struts validation and the page attribute in the field tag? To 
> validate different parts of the form?
>
> I'm really "stucked in a moment and I can't get out of it".
>
> Thank you,
>
> RĂºben Carvalho

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

Reply via email to