struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linus Nikander" <>
Subject preslect <option> from nested list
Date Fri, 13 Feb 2004 10:18:11 GMT
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"

-------- JSP - code -----------

//Linus Nikander -

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message