Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 97773 invoked from network); 3 Dec 2009 13:45:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Dec 2009 13:45:49 -0000 Received: (qmail 47953 invoked by uid 500); 3 Dec 2009 13:45:46 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 47884 invoked by uid 500); 3 Dec 2009 13:45:46 -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 47874 invoked by uid 99); 3 Dec 2009 13:45:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 13:45:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of saeedcs@gmail.com designates 209.85.221.185 as permitted sender) Received: from [209.85.221.185] (HELO mail-qy0-f185.google.com) (209.85.221.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 13:45:36 +0000 Received: by qyk15 with SMTP id 15so522337qyk.23 for ; Thu, 03 Dec 2009 05:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=kK+E3n8dXRXtnVE4lgGkmu2pjbtansI9r3+LTfoj9J0=; b=uHzgI3ERcbjTCCYd9Q8VuHJcDo2aWUyYB7DKO9UpmDtAiSmX3H8+iT5JSkxTZxRTlN I/wIQZQ2edGLxYPPSWtJAkxSbmbOzrrIqFtzB8I15uJsFBL2zvqEdfD++krZAa5Nw8Vo uJouIrKV/dUmoTJ2qb6DmmTMdWGEAfVLbA6I0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Z+0/MNMTWaqF4c98Mkp7INLHRjZwWN0yawHJutHlAz8R1neulZgfBVlpE9nCubdI4e VCOmTNjsyWBHiz+uqslNWDAXlXBPjgoUr5hQHV/c4rZFY99Bi1I13wq+dVJSF1vpJFcF j7WaMNNS3MjQBJZfqu5TEFlf8mhNndP310gvY= MIME-Version: 1.0 Received: by 10.224.118.129 with SMTP id v1mr836513qaq.274.1259847914900; Thu, 03 Dec 2009 05:45:14 -0800 (PST) In-Reply-To: <921692.63263.qm@web30405.mail.mud.yahoo.com> References: <45382.57412.qm@web30402.mail.mud.yahoo.com> <26613875.post@talk.nabble.com> <579bc170912021813o2a33def8xc2d2a9d4d445741@mail.gmail.com> <979116.89720.qm@web30403.mail.mud.yahoo.com> <579bc170912030156r7a74936fof0614b95efbd5a5c@mail.gmail.com> <379375.25539.qm@web30405.mail.mud.yahoo.com> <579bc170912030429v6ca6abcbo6bb892d1a07d61c8@mail.gmail.com> <921692.63263.qm@web30405.mail.mud.yahoo.com> Date: Thu, 3 Dec 2009 18:45:14 +0500 Message-ID: <579bc170912030545h17ef4e1escad635b776c7d263@mail.gmail.com> Subject: Re: How to get the key name From: Saeed Iqbal To: Struts Users Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I am sorry i dont think i can be of any more help On Thursday, December 3, 2009, wrote: > Ok, now I know what you mean the key, you mean ${getText(label.name)} ? > But that is not that I want, if I hard code the key name there, that defe= at the whole reuse purpose. > I want something similar like fieldName but for key. fieldName is a const= ant variable from struts, when I write the code like this > error.required =3D ${getText(fieldName)} is required. > > and if I have these 2 tag in jsp: > > > > In runtime when validation error, it will search for user.name and user.e= mail property in the resource bundle files. > > So, if I've this > user.name =3D Name > user.email =3D Email > in the resource bundle files, > > Then it will display correctly as > Name is required. > Email is required. > > But in my resource bundle files, I only have > label.name =3D Name > label.email =3D Email > > Which map to the key, so I need to find a way to get it. > > Hope you can understand, sorry for my poor description. > > Regards > LV > > > > > ________________________________ > From: Saeed Iqbal > To: Struts Users Mailing List > Sent: Thu, December 3, 2009 12:29:30 PM > Subject: Re: How to get the key name > > No not that > > key=3D"i8nl.nameKey" > > Send me your file > > On Thu, Dec 3, 2009 at 5:27 PM, wrote: > >> No, I changed my property to this >> error.required =3D ${getText(key)} is required. >> >> It is not working. >> >> >> >> ________________________________ >> From: Saeed Iqbal >> To: Struts Users Mailing List >> Sent: Thu, December 3, 2009 9:56:29 AM >> Subject: Re: How to get the key name >> >> Yes key is in struts. See the docs. >> >> On Thu, Dec 3, 2009 at 2:54 PM, wrote= : >> >> > Hi, >> > >> > Sorry, I think you misunderstanding my question. >> > >> > My main question is fieldName give me the name attribute value, but I >> want >> > to get my key attribute value, is there anything like fieldKey or >> something >> > ? >> > >> > > > required=3D"true"/> >> > >> > fieldName =3D user.name >> > =A0?? =3D label.name >> > >> > Thanks >> > LV >> > >> > >> > >> > ________________________________ >> > From: Saeed Iqbal >> > To: Struts Users Mailing List >> > Sent: Thu, December 3, 2009 2:13:20 AM >> > Subject: Re: How to get the key name >> > >> > You use the key attribute instead of label >> > >> > On Wednesday, December 2, 2009, Siddiq Syed wrot= e: >> > > >> > > Try this, >> > > >> > > >> > > >> > > >> > > -siddiq. >> > > >> > > >> > > Louis Voo wrote: >> > >> >> > >> Hi, >> > >> >> > >> I've this text field in my jsp >> > >> >> > >> > > >> required=3D"true"/> >> > >> >> > >> and this property in the resource bundle >> > >> >> > >> error.required =3D ${getText(fieldName)} is required. >> > >> label.name =3D Name >> > >> >> > >> >> > >> When there is validation error, it looking for user.name property, = it >> > is >> > >> fine because I'm using fieldName, so my question is there anyway I = can >> > get >> > >> key name? So that I can use the label.name property. >> > >> >> > >> >> > >> Regards >> > >> LV >> > >> >> > > >> > > -- >> > > View this message in context: >> > http://old.nabble.com/How-to-get-the-key-name-tp26613714p26613875.html >> > > Sent from the Struts - User mailing list archive at Nabble.com. >> > > >> > > >> > > --------------------------------------------------------- --=20 Saeed Iqbal Independant Consultant J2EE - Application Architect / Developer --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org