listValue="%{getText('myCategory.'+toString())}"

this way i can change the select display value from .properties file

in .properties i have to use

myCategory.ELECTRIC= Electric


On Tue, May 4, 2010 at 12:24 PM, Upasana Sharma <sharma...@gmail.com> wrote:

> I have also seen that there is some function called ordinal() in enum. can
> anyone suggest how can i use it in s:select tag
>
>
>
> On Tue, May 4, 2010 at 12:01 PM, Upasana Sharma <sharma...@gmail.com>wrote:
>
>> Hi I am using s:select and populating it with enum .
>>     <s:select list="categoryList" name="complaintType" ></s:select>
>>
>> the enum is like
>>
>> public enum EComplaintType {
>>  CLUB_HOUSE(0), ELECTRIC(1);
>> }
>>
>> In the jsp the select is formed as
>>
>> <select name="categorySelect" id="categorySelect">
>>
>>
>>     <option value="CLUB_HOUSE">CLUB_HOUSE</option>
>>     <option value="ELECTRIC">ELECTRIC</option>
>> </select>
>>
>> Here both the key and value for the select are the same as the Name i have 
>> given in enum EComplaintType
>>
>> 1. I want to know that how can i set the value for select as the numeric 
>> equivalent of the enum
>> 2. Also if I want the select option display name to be fetched from some 
>> .properties file based on the key value how should i apporach the scenario?
>>
>> Thanks in advance...
>>
>> Upasana Sharma
>>
>
>
>
> --
> Thanks and Regards
> Upasana Sharma
>



-- 
Thanks and Regards
Upasana Sharma

Reply via email to