It seems to me the syntax is wrong .......... try this <html:select property='<%=genreIds[0]%>' styleClass="inputbox"> <html:options collection="genres" property="value" labelProperty="label"/> </html:select>
# Use <%=genreIds[0]%> insteed of <%="genreIds[0]"%> Just remove the quotes ........... --- On Sun, 28/12/08, Gordian Yuan <gordiany...@gmail.com> wrote: > From: Gordian Yuan <gordiany...@gmail.com> > Subject: Re: html:select problem > To: "Struts Users Mailing List" <user@struts.apache.org> > Date: Sunday, 28 December, 2008, 8:31 PM > http://www.theserverside.com/discussions/thread.tss?thread_id=35726 > > or > > you can search it use google > > http://www.google.com/search?hl=zh-CN&q=select+default+option+struts&btnG=Google+搜索&lr=<http://www.google.com/search?hl=zh-CN&q=select+default+option+struts&btnG=Google+%E6%90%9C%E7%B4%A2&lr=> > > > > On Sat, Dec 27, 2008 at 7:33 PM, Tanb81 > <tanmoy_...@yahoo.com> wrote: > > > > > hi, > > I am developing a project on struts. I have a drop > down like :- > > > > <html:select property='<%= > "genreIds[0]" %>' > styleClass="inputbox"> > > <html:options > collection="genres" property="value" > > labelProperty="label"/> > > </html:select> > > > > Now I need a value of this dropdown to be > automatically selected based on a > > value which is coming from previous page. The problem > is I am not able to > > do this because I am new to Struts. > > > > Please help me out. > > Thanks in advance. > > > > > > > > -- > > View this message in context: > > > http://www.nabble.com/html%3Aselect-problem-tp21183393p21183393.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 > > > > Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org