You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Upasana Sharma <sh...@gmail.com> on 2010/05/05 10:56:58 UTC

s:checkboxlist help

<s:checkboxlist list="#{0:'',1:'',2:''}" name="user"
label="%{getText('com.upasana.type.'+toString())}"></s:checkboxlist>

But the key value is not passed to getText()

The idea is to just initialize the keys in the checkboxlist and fetch the
corresponding display text from .properties file

Thanks in advance

Re: s:checkboxlist help

Posted by Upasana Sharma <sh...@gmail.com>.
thanks for the response
the issue is solved as

    <s:checkboxlist list="#{0:'',1:'',2:'',3:'',4:''}" name="user"
listValue="%{getText('com.upasana..type.'+
key.toString())}"></s:checkboxlist>



On Wed, May 5, 2010 at 2:41 PM, Sébastien Domergue <
sebastien.domergue@c-s.fr> wrote:

> Hi,
>
> the label attribute is only used to render the label of the group of
> checkboxes. It is not used in an iterative way. In order to access to your
> .properties file, you have to build your list in your action then give it in
> list attribute.
>
> Regards
>
> Sébastien
>
> Le 05/05/2010 10:56, Upasana Sharma a écrit :
>
>  <s:checkboxlist list="#{0:'',1:'',2:''}" name="user"
>> label="%{getText('com.upasana.type.'+toString())}"></s:checkboxlist>
>>
>> But the key value is not passed to getText()
>>
>> The idea is to just initialize the keys in the checkboxlist and fetch the
>> corresponding display text from .properties file
>>
>> Thanks in advance
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Thanks and Regards
Upasana Sharma

Re: s:checkboxlist help

Posted by Sébastien Domergue <se...@c-s.fr>.
Hi,

the label attribute is only used to render the label of the group of 
checkboxes. It is not used in an iterative way. In order to access to 
your .properties file, you have to build your list in your action then 
give it in list attribute.

Regards

Sébastien

Le 05/05/2010 10:56, Upasana Sharma a écrit :
> <s:checkboxlist list="#{0:'',1:'',2:''}" name="user"
> label="%{getText('com.upasana.type.'+toString())}"></s:checkboxlist>
>
> But the key value is not passed to getText()
>
> The idea is to just initialize the keys in the checkboxlist and fetch the
> corresponding display text from .properties file
>
> Thanks in advance
>
>    

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