You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by j alex <st...@gmail.com> on 2007/08/20 21:52:12 UTC

S2 : loading dropdown from resource bundle

Hi,

Can anyone please help me with loading a <s:select> tag with a OGNL
list that's been configured in globalMessages.properties as follows :

list.states = 'AL':'Alabama', 'AK':'Alaska'

In the JSP, i'm having :

 <s:select
       name="stateList"
       list="%{#{getText('list.states')}}"
/>

but this doesnt show me the list, but renders a single <option> with
the list coming up as a String.

I'm sure this is easy to do, but just not able to hit the right syntax.

Thanks,
Joseph

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


Re: S2 : loading dropdown from resource bundle

Posted by j alex <st...@gmail.com>.
Resending...

In S1, we used to have a servlet that loads the properties into VOs on
startup, and we use that in the JSP. I'm thinking if we can get rid of this
step completely and directly load the properties using S2 tags.

Also, can we reload the properties without restarting the app?




On 8/20/07, j alex <st...@gmail.com> wrote:
>
> Hi,
>
> Can anyone please help me with loading a <s:select> tag with a OGNL
> list that's been configured in globalMessages.properties as follows :
>
> list.states = 'AL':'Alabama', 'AK':'Alaska'
>
> In the JSP, i'm having :
>
> <s:select
>       name="stateList"
>       list="%{#{getText('list.states')}}"
> />
>
> but this doesnt show me the list, but renders a single <option> with
> the list coming up as a String.
>
> I'm sure this is easy to do, but just not able to hit the right syntax.
>
> Thanks,
> Joseph
>