You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laurie Harper <la...@holoweb.net> on 2008/03/05 20:33:01 UTC
Re: Struts 2 + Freemarker - how to set a select list option to selected
from a request param
Jonny Cavell wrote:
> If I set a request param with ?professionId=3, this does not make the
> professionId with value 3 selected. What am I doing wrong?
>
> ....
> <@s.select name = "professionId" key="profession"
> headerKey="" headerValue="select_profession"
> list="professions"
> listKey="id"
> listValue="name"
> value = "%{#parameters.professionId}"
> required="true"
> />
> ....
What does the 'professions' property of your action contain? What type
is the 'professionId' property of your action? And what does the
generated HTML look like? My guess would be that you have a type
mis-match between action.professionId and action.professions[#].id.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org