Use the html:options [1] or html:optionsCollection tag [2]? [1] http://struts.apache.org/1.2.9/userGuide/struts-html.html#options [2] http://struts.apache.org/1.2.9/userGuide/struts-html.html#optionsCollection
Dave --- On Tue, 12/16/08, m.harig <m.ha...@gmail.com> wrote: > From: m.harig <m.ha...@gmail.com> > Subject: Re: <html:option> tag > To: user@struts.apache.org > Date: Tuesday, December 16, 2008, 8:23 AM > is there anyone to answer my question%-| > > > > m.harig wrote: > > > > hi all > > > > am getting no.of users from DAO class and all > username are in the form of > > User Object. > > > > ArrayList list = new ArrayList(); > > while(rs.next()){ > > User user = new User(); > > user.setUsername("abc"); > > list.add(user); > > } > > > > this is my code . > > <% > > ArrayList userList = > > (ArrayList)request.getAttribute("users"); > > %> > > > > > > <html:select > property="username"> > > <logic:iterate id="users" > collection="<%=userList%>" > > > length="<%=""+(userList.size()-1)%>"> > > <html:option > value=""><bean:write name="users" > > property="username"/></html:option> > > </logic:iterate> > > </html:select> > > > > i can populate my User object by bean write > . How do i set my > > username value to <html:option > value="">.. anyone please let me clear > > > > -- > View this message in context: > http://www.nabble.com/%3Chtml%3Aoption%3E-tag-tp21028416p21032987.html > Sent from the Struts - User mailing list archive at > Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org