The <html:select> needs to be provided with the property it's associated to, the one on your form bean that will hold the actual value selected.
<html:select property="mySelectValue" style="font-size: 10px;" property="goTo" size="1"> <html:optionsCollection name="PageDetailView" property="totalNumOfPagesCollection" /> </html:select> "mySelectValue" should be a property on your form bean. hth, Hubert --- Timo_Tjäder <[EMAIL PROTECTED]> wrote: > Hi, > > I have problems with optionsCollection, when used with <html:select> > custom tag. > > 1. I set up in a bean LabelValueBean object in a Vector > 2. pass it back to form and try to create a <html:selec> > > This part should display a combo box with options, but > it just does not work. It does not display anything. > > Html code is as follows: > > <html:select style="font-size: 10px;" property="goTo" size="1"> > <html:optionsCollection name="PageDetailView" > property="totalNumOfPagesCollection"/> > </html:select> > > I have checked using struts "bean:write" the contents of > the object. Bean write claims that totalNumOfPages really > contains LabelValueBean-objects (14 peaces). > LabelValueBean[1, 1], LabelValueBean[2, 2], LabelValueBean[3, 3], > ... > > So, does anyone know how to reference to this object correctly. > Current solution does not diaplay anything to the screen. > > Thanks, > > Timo > > So what I'd like to do is display a selection list of > all availabele pages from which user choose one and press > a goTo page button. This is quite common web control in > any web pages. > > > .... > <logic:equal name="PageDetailView" property="linkType" > value="add-total-num-of-pages-collection"> > <bean:write name="PageDetailView.totalNumOfPagesCollection" > property="LabelValueBean"/> > > <html:select style="font-size: 10px;" property="goTo" size="1"> > <html:optionsCollection name="PageDetailView" > property="totalNumOfPagesCollection"/> > </html:select> > </logic:equal> > > > > [1] 2 3 4 5 next » Result 14 pages. > .... > ÄLabelValueBeanÄ1, 1Å, LabelValueBeanÄ2, 2Å, LabelValueBeanÄ3, 3Å, > LabelValueBeanÄ4, 4Å, LabelValueBeanÄ5, 5Å, LabelValueBeanÄ6, 6Å, > LabelValueBeanÄ7, 7Å, LabelValueBeanÄ8, 8Å, LabelValueBeanÄ9, 9Å, > LabelValueBeanÄ10, 10Å, LabelValueBeanÄ11, 11Å, LabelValueBeanÄ12, > 12Å, LabelValueBeanÄ13, 13Å, LabelValueBeanÄ14, 14ÅÅ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]