struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: Possible bug with <s:select> Struts 2.0.11
Date Mon, 01 Sep 2008 18:45:04 GMT
--- On Mon, 9/1/08, Roger wrote:
> Using the <s:select> tag when getting the data from
> the action, appears not to  retrieve the label text 
> from my resource bundle. but when I list the options 
> in the jsp it does. So;
> 
> <s:select
>   label="label.homeInsurance.details.housetype"
>   name="housetype"                                  
>   list="houseType"
>   required="true"
>   headerKey="-1"
>   headerValue="--Select--"
>   cssClass="select"
>   /> 
> 
> displays "label.homeInsurance.details.housetype"
> as the text for the label whereas;
> 
> <s:select 
>   key="label.homeInsurance.details.owner"
>   name="owner"
>   headerKey="-1"
>   headerValue="--Select--"
>   list="#{'01':'Owner','02':'Tenant','03':'Other'}"
>   required = "true"
>   cssClass="select"/>
>
> correctly displays the text from my resource bundle.
> 
> Have I missed something before I report a bug?         

In the first usage you're specifying the "label" attribute, which will use whatever string
you put in there. You may use a getText(...) call.

The second instance uses the "key" attribute, which does multiple things, one of which is
set the label text by doing the resource lookup automagically.

It's not related to how the list is supplied.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message