struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mailtolouis2020-str...@yahoo.com
Subject Re: How to get the key name
Date Thu, 03 Dec 2009 09:54:53 GMT
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 ?

<s:textfield key="label.name" name="user.name" maxlength="35" required="true"/>

fieldName = user.name
 ?? = label.name 

Thanks
LV



________________________________
From: Saeed Iqbal <saeedcs@gmail.com>
To: Struts Users Mailing List <user@struts.apache.org>
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 <siddiq_sa@yahoo.com> wrote:
>
> Try this,
>
> <s:text name="label.name" />
> <s:textfield name="user.name" maxlength="35" required="true"/>
>
> -siddiq.
>
>
> Louis Voo wrote:
>>
>> Hi,
>>
>> I've this text field in my jsp
>>
>> <s:textfield key="label.name" name="user.name" maxlength="35"
>> required="true"/>
>>
>> and this property in the resource bundle
>>
>> error.required = ${getText(fieldName)} is required.
>> label.name = 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.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

-- 
Saeed Iqbal
Independant Consultant (Freelance)
J2EE - Application Architect / Developer

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message