struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriel Belingueres" <belingue...@gmail.com>
Subject Re: Struts 2.0.11 from 2.0.9 EL Expression problem
Date Mon, 25 Aug 2008 13:52:25 GMT
The select documentation [1] shows perfectly valid uses of the tag.

Yours:
<s:select name="%{fieldName}"
             list='list'
             listKey='${listKey}'
             listValue='${listValue}'
             multiple='true'
             size='8'
             required="%{required}"
 />

Why the name parameter has a %{}? Do you intend to give a different
name to the select at runtime?

Is the 'list' really a java.util.List? or is it a Map?

Please post you page and action code to provide you more help.

[1] http://struts.apache.org/2.1.2/docs/select.html

2008/8/24, crappycrumpet <pandamouse@hotmail.com>:
>
> Hi Gabriel,
>
> I tried that already and just gives me "name" for listValue and "id" for
> listKey (as in the select box would be filled with literally the string 'id'
> for value and 'name' for the display value :( ).
>
> is there an ognl expression that I can use so that it evaluates the result
> again?
>
> Thanks for the reply!
>
> cheers.
>
>
> Gabriel Belingueres-2 wrote:
> >
> > try using neither ${} nor %{}:
> >
> >              listKey='listKey'
> >              listValue='listValue'
> >
> > 2008/8/22, crappycrumpet <pandamouse@hotmail.com>:
> >>
> >> Hi All,
> >>
> >> I know EL Expression has been disabled from 2.0.10 on. Unfortunately I
> >> have
> >> some jsp has uses EL.
> >> I have this jsp files that renders a generic dropdown box that looks like
> >> the following.
> >>
> >> <s:select name="%{fieldName}"
> >>              list='list'
> >>              listKey='${listKey}'
> >>              listValue='${listValue}'
> >>              multiple='true'
> >>              size='8'
> >>              required="%{required}"
> >>  />
> >>
> >> So the action that uses this would have a list of objects and a listKey
> >> field that contains a string saying for example "id" and a listValue
> >> string
> >> saying for example "name" and the select drop would be shown with the
> >> list
> >> of object's id and it's name value for display.
> >>
> >> This however no longer works after updating to 2.0.11.2. Substituting ${}
> >> with %{} only end it putting the literal value (e.g. "id" and "name") in
> >> the
> >> drop down box's value and display value. Any idea how I can work around
> >> this?
> >>
> >> Cheers.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Struts-2.0.11-from-2.0.9-EL-Expression-problem-tp19100876p19100876.html
> >> 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
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Struts-2.0.11-from-2.0.9-EL-Expression-problem-tp19100876p19136189.html
> 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
>
>

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


Mime
View raw message