Hii

I am using Struts  DispatchAction and i am facing  a peculiar problem 
while validating .
Now i want to validate ,my action form only in insert or update mode.
For read mode i want to prevent validation.
To achive this is am writing validation="false" in the action mapping , 
and i am manually calling validation in insert and update methods of my 
action class.


         DynaActionForm frm=(DynaActionForm)form;
          ActionErrors  errors=frm.validate(mapping,request);
         if ( errors != null && !errors.isEmpty() ) {
                           saveErrors(request, errors);
                  return (mapping.findForward("validationfailure"));
                }
        ........

But when i am doing validation in this way.
It is always trying to validate the action , even in read mode also.
Can anybody tell me why is this happening.

Thanx in advance


Disclaimer : 
This message and any attachments (hereinafter referred to as the Said 
Information) are  intended solely for the addressee. The Said Information is 
confidential and may be privileged and is also prohibited from disclosure. 
Access, use, copying, distribution or e-use of the Said Information by anyone 
except the addressee is unauthorized. If you are not the intended addressee, 
please destroy all copies of  the Said Information in your possession and also 
delete the same from your computer. Any views expressed in the Said Information 
are those of the individual sender except where the sender, with due authority 
of CRISIL Ltd./CRISIL MarketWire Ltd./Global Data Services of India Ltd. 
specifically states them to be the views of CRISIL Ltd./CRISIL MarketWire 
Ltd./Global Data Services of India Ltd. Nothing contained in the Said 
Information is capable or intended to create any legally binding obligations on 
the sender  CRISIL Ltd./CRISIL MarketWire Ltd./Global Data Services of India L
 td. who accept no responsibility, whatsoever, for loss or damage from the use 
of  the Said Information including damage from viruses.

Reply via email to