> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> I tried that one, but i couldnt bypass the validation...... 
> i've an Update page, some of the attributes are mandatory. 
> onlick of the cancel btn im forwarding it to the home page, 
> onclick of the cancel btn it validates the form and gives error. 
> how do i bypass that one. 

I think this is the same sort of problem as, "Why does my form get
validated the first time it is displayed?"  You can either turn off
validation and call validate() manually when appropriate, or you can
override the validate method, and step around validation when it's not
necessary.  

I have validation turned on, but it only happens when the user clicks
'Finish':

   public ActionErrors validate( ActionMapping mapping,
      HttpServletRequest request )
   {
      /*
       *  only validate if the form has actually been POSTed.
       *  This keeps error messages from appearing when the
       *  form is displayed for the first time.
       */
      if ( request.getMethod().equals( "POST" ) ) {
         return super.validate( mapping, request );
      } else {
         return null;
      }
   }

You might look for the 'cancel' button in the request, and skip
validation in that case.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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

Reply via email to