struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linus Nikander" <li...@nikander.net>
Subject [SOLVED] Re: preslect <option> from nested list
Date Fri, 13 Feb 2004 10:42:40 GMT
Solved it myself after a bit of experimenting. Presetting
="<%=\"problematicOddsList[\"
> + i + \"].sportTypeId\"%> to a valid sportTypeId did the trick.

//Linus


"Linus Nikander" <linus@nikander.net> wrote in message
news:c0i893$3i8$1@sea.gmane.org...
> I'm having trouble pre-selecting one of the <html:options/> entries that
are
> generated by the below jsp code. Which attribute of which bean should i
set
> to which value ?
>
> UnknownSportForm contains two ArrayLists one
> called currentSportsList  and one called problematicOddsList. The
> problematicOddsList is in turn made up of beans with the appropriate
getters
> and setters. currentSportsList also contains beans with getters and
setters
> for its values. What I want to do is preselect one of the sportType
elements
> in the select fields I generate. How do i accomplish this ?
>
> -------- JSP - code -----------
>   <html:select name="UnknownSportForm"
property="<%=\"problematicOddsList[\"
> + i + \"].sportTypeId\"%>" size="3">
>         <html:options collection="currentSportsList"
property="sportTypeId"
> labelProperty="sportType"/>
>     </html:select>
>
> -------- JSP - code -----------
>
> //Linus Nikander - linus@nikander.net




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


Mime
View raw message