You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Burton Rhodes <bu...@gmail.com> on 2009/03/24 02:44:38 UTC

[S2] How do I convert getText to a list for ?

I know this is a simple one, but for some reason just can't crack it.

I have a resource property like so:
titleOptions=Mr.,Mr. & Mrs.,Mrs.,Ms.,Dr.,Dr. & Mrs.,Mr. & Dr.,Dr. & Dr.

And then I have html like this:
<!-- This will print out the entire line in "one" select choice -->
<s:select
      name="teamUser.title"
      list="%{getText('titleOptions')}"
/>

I've tried surrounding it by #{...} in several places but get an a
parse error or cannot convert to list/array/collection, etc.

What's the answer here? Many thanks.

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


Re: [S2] How do I convert getText to a list for ?

Posted by Dave Newton <ne...@yahoo.com>.
Burton Rhodes wrote:
> I know this is a simple one, but for some reason just can't crack it.
> 
> I have a resource property like so:
> titleOptions=Mr.,Mr. & Mrs.,Mrs.,Ms.,Dr.,Dr. & Mrs.,Mr. & Dr.,Dr. & Dr.
> 
> And then I have html like this:
> <!-- This will print out the entire line in "one" select choice -->
> <s:select
>       name="teamUser.title"
>       list="%{getText('titleOptions')}"
> />
> 
> I've tried surrounding it by #{...} in several places but get an a
> parse error or cannot convert to list/array/collection, etc.

Might be able to use <s:generator> for this.

Dave


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