I am not using DynaForms currently.  If I stay with my Form beans extending
ValidatorForm, is there any way to call the validate() method and use the
validator.xml at the same time.  

For example, I have the following Form bean.

 public class LoginForm 
   extends ValidatorForm
   implements GlobalConstants
 {
 }


I have validation for username and password in the validator.xml.  However,
I plan on handling redirects if they are passed in as a parameter in the URL
query.  The validation for this may be a little more complicated and I
wanted to handle it in the validate() method.  However, if I create an
ActionErrors object in the validate() method, all errors reported by the
validation.xml and validation-rules.xml is erased as a new ActionErrors
object is assigned to the HttpRequest.  Is there any way to append to the
ActionErrors object if one already exists?  I tried the following but it
didn't work.

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
{
  ActionErrors errors = (ActionErrors)
request.getAttribute(ActionErrors.GLOBAL_ERROR);            

  if (errors == null)
  {
    errors = new ActionErrors();      
  }
  /*

  URL redirect validation done here and errors assigned as necessary.

  */

  return errors;
}

Any suggestions or is the best way just writing my own Validator class for
the application?

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

Reply via email to