You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by GaryD <ga...@erac.com> on 2007/09/10 17:06:28 UTC

s:select static map

I am trying to set up a static map using the select tag. I set my the tag as
explain in the documentation.

  <s:select name="searchBy" list="#{'01':'Begins with', '02':'Contains',
'03':'Equals'}" />

But when it tries to render the page I get this error.

Syntax error in expression. Encountered ":". Expected one of : "}", ".",
"[", ">", "gt", "<", "lt", ">=", "ge", "<=", "le", "==", "eq", "!=", "ne",
"&&", "and", "||", "or", "*", "+", "-", "?", "/", "div", "%", "mod", 

I can get this to work, but I need my keys to be different.
  <s:select name="searchBy" list="#{'Begins with', 'Contains', 'Equals'}" />

-- 
View this message in context: http://www.nabble.com/s%3Aselect-static-map-tf4415381.html#a12594727
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: s:select static map

Posted by j alex <st...@gmail.com>.
Gary,

I think your syntax is right - just pasted from your email into my JSP
and it works.

Let me know if you are able to move the static map to a properties
file and get it working from there ; i'm still trying to get the
syntax right on that!

-Joseph



On 9/10/07, GaryD <ga...@erac.com> wrote:
>
>
> I am trying to set up a static map using the select tag. I set my the tag
> as
> explain in the documentation.
>
>   <s:select name="searchBy" list="#{'01':'Begins with', '02':'Contains',
> '03':'Equals'}" />
>
> But when it tries to render the page I get this error.
>
> Syntax error in expression. Encountered ":". Expected one of : "}", ".",
> "[", ">", "gt", "<", "lt", ">=", "ge", "<=", "le", "==", "eq", "!=", "ne",
> "&&", "and", "||", "or", "*", "+", "-", "?", "/", "div", "%", "mod",
>
> I can get this to work, but I need my keys to be different.
>   <s:select name="searchBy" list="#{'Begins with', 'Contains', 'Equals'}"
> />
>
> --
> View this message in context:
> http://www.nabble.com/s%3Aselect-static-map-tf4415381.html#a12594727
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>