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]