Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 86982 invoked from network); 24 Dec 2010 18:02:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Dec 2010 18:02:00 -0000 Received: (qmail 38371 invoked by uid 500); 24 Dec 2010 18:01:57 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 38335 invoked by uid 500); 24 Dec 2010 18:01:57 -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 38327 invoked by uid 99); 24 Dec 2010 18:01:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 18:01:57 +0000 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of satheesh.kannan@hcl.com does not designate 203.105.185.23 as permitted sender) Received: from [203.105.185.23] (HELO gws05.hcl.com) (203.105.185.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 18:01:52 +0000 Received: from NDA-HCLIN-HT01.CORP.HCL.IN (10.248.64.35) by NDA-HCLIN-EDGE3.hcl.in (10.248.64.140) with Microsoft SMTP Server id 8.2.254.0; Fri, 24 Dec 2010 23:31:34 +0530 Received: from CHN-HCLT-CASHT2.HCLT.CORP.HCL.IN (10.108.45.28) by NDA-HCLIN-HT01.CORP.HCL.IN (10.248.64.35) with Microsoft SMTP Server (TLS) id 8.2.254.0; Fri, 24 Dec 2010 23:31:26 +0530 Received: from CHN-HCLT-EVS09.HCLT.CORP.HCL.IN ([fe80::69bc:f9a4:16ee:d3c6]) by CHN-HCLT-CASHT2.HCLT.CORP.HCL.IN ([::1]) with mapi; Fri, 24 Dec 2010 23:31:24 +0530 From: Satheesh Kannan A B To: Struts Users Mailing List Date: Fri, 24 Dec 2010 23:31:23 +0530 Subject: RE: FW: Iterator: field errors. Thread-Topic: FW: Iterator: field errors. Thread-Index: Acujk9RvShWFlwUKRrSujcVD9vPb3QAAK8Vw Message-ID: <196713748F6954459B10FE5282699F5F1BF44379D1@CHN-HCLT-EVS09.HCLT.CORP.HCL.IN> References: <196713748F6954459B10FE5282699F5F1BF44379D0@CHN-HCLT-EVS09.HCLT.CORP.HCL.IN> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi, Can u please give an example for below of my code Thanks and Regards, Satheesh Kannan A B -----Original Message----- From: Dave Newton [mailto:davelnewton@gmail.com]=20 Sent: Friday, December 24, 2010 11:25 PM To: Struts Users Mailing List Subject: Re: FW: Iterator: field errors. You can if they're indexed, no? On Dec 24, 2010 12:53 PM, "Satheesh Kannan A B" wrote: > Hi, > > Still now I didn't get any solution for this. I think in struts 2.* serve= r side validation is not good as struts 1.*. > Since i cant display exact fielderror message for a field in a iterator and also once I submit I cant get the list object again.( list object ill get from data layer, its not static to use prepare method). > > > Thanks and Regards, > > Satheesh Kannan A B > > > -----Original Message----- > From: Satheesh Kannan A B > Sent: Friday, December 10, 2010 3:14 PM > To: Struts Users Mailing List (user@struts.apache.org) > Subject: Re: Iterator: field errors. > > > Hi, > Generic I have given a pojo class List and am doing validation as a separate method in my action as given below. > List boList =3D new ArrayList< PojoClassBO >(); > > Public String save(){ > > If(isValid()) > { > Continue.... > }else{ > Return "input"; > } > > Return "success"; > } > > Private Boolean isValid(){ > if(String.isEmpty()){ > addFieldError("bo.FieldName",getText("error.code")); > } > > if (getFieldErrors().size() > 0) { > return true; > } else{ > Return false; > } > } > > > > Thanks and Regards, > > Satheesh Kannan A B > > > -----Original Message----- > From: Li Ying [mailto:liying.cn.2010@gmail.com] > Sent: Friday, December 10, 2010 5:35 AM > To: Struts Users Mailing List > Subject: Re: Iterator: field errors. > > What is the data type of objectList? > > How did you execute the validation, and how did you add the field error? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > Hi, > > I have a requirement like, am iterating a list of values and populating i= n a text box. It may be more than 5 rows. I need to validate whether it's an integer and want to display error message below the field. For a normal field with a unique I have done it well. But I don't know how to do for lis= t if validation fails. Since after validation fails the iterator grid also empty and am not able to display field values. > > > > > Please suggest me how to populate grid values in jsp if validation fails and also validation messages below field of each row. > > > > Thanks and Regards, > > Satheesh Kannan A B > > ::DISCLAIMER:: > ---------------------------------------------------------------------------= -------------------------------------------- > > The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. > It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in > this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. > Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of > this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have > received this email in error please delete it and notify the sender immediately. Before opening any mail and > attachments please check them for viruses and defect. > > ---------------------------------------------------------------------------= -------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org