Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 32945 invoked from network); 24 Aug 2006 11:46:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Aug 2006 11:46:20 -0000 Received: (qmail 23933 invoked by uid 500); 24 Aug 2006 11:46:10 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 23897 invoked by uid 500); 24 Aug 2006 11:46:10 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 23883 invoked by uid 99); 24 Aug 2006 11:46:10 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Aug 2006 04:46:10 -0700 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [198.164.200.23] (HELO ursa-nb00s0.nbnet.nb.ca) (198.164.200.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Aug 2006 04:46:08 -0700 Received: from NSCFMM01.aliant.ca ([142.177.1.23]) by ursa-nb00s0.nbnet.nb.ca (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35) with ESMTP id ca for ; Thu, 24 Aug 2006 08:45:46 -0300 Received: from nsexcn03.aliant.icn (Not Verified[142.134.124.157]) by NSCFMM01.aliant.ca with NetIQ MailMarshal (v5.5.6.7) id ; Thu, 24 Aug 2006 08:49:16 -0300 Received: from NSEXMB02.aliant.icn ([142.134.124.72]) by nsexcn03.aliant.icn with Microsoft SMTPSVC(6.0.3790.1830); Thu, 24 Aug 2006 08:45:46 -0300 X-MimeOLE: Produced By Microsoft Exchange V6.5 MIME-Version: 1.0 Subject: RE: Validation in Struts DisptachAction Date: Thu, 24 Aug 2006 08:43:19 -0300 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Validation in Struts DisptachAction Thread-Index: AcbHbPPp725nCHopQeOsa1D9OyntRwABYspm References: From: "Sherwood, Reg" To: "Struts Users Mailing List" X-OriginalArrivalTime: 24 Aug 2006 11:45:46.0040 (UTC) FILETIME=[D6316B80:01C6C772] Content-class: urn:content-classes:message Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C6C772.D56A715F" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C6C772.D56A715F Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Vaneet =20 I'm no expert on this to be sure; but I ran into a similiar issue. What = I did was provided the check for the Read only mode in the forms = validate method; if read only mode the validate method returned null; = otherwise it invoked the super.validate method which performs the normal = validation checks on the form. =20 Hope this helps. =20 Reg ________________________________ From: Vaneet Sharma [mailto:vasharma@crisil.com] Sent: Thu 24/08/2006 8:08 AM To: struts-user@jakarta.apache.org Subject: Validation in Struts DisptachAction 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=3D"false" in the action mapping = , and i am manually calling validation in insert and update methods of my action class. DynaActionForm frm=3D(DynaActionForm)form; ActionErrors errors=3Dfrm.validate(mapping,request); if ( errors !=3D 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. ------_=_NextPart_001_01C6C772.D56A715F Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org ------_=_NextPart_001_01C6C772.D56A715F--