Simon,
thank you for your answer, I modified the getter/setter to handle
SelectItem.getValue().toString() instead of the selectItem itself.
But had you ever the chance to take a look at the jsftags-guide examples
(http://www.exadel.com/tutorial/jsf/jsftags-guide.html)?
They are using the SelectItems directly.
Where's the difference?
Kurt
Quoting Simon Kitching <[EMAIL PROTECTED]>:
> Kurt Edegger wrote:
> > Hi everybody,
> >
> > I'd like to use a dropdown menu in my jsp page, therefor I added
> >
> > <h:selectOneMenu id="selectModifier" value="#{bean.currentItem}">
> > <f:selectItems value="#{bean.itemList}" />
> > </h:selectOneMenu>
> >
> > to my page. The bean provides getter and setters for both properties,
> whereby
> > currentItem is of type SelectItem and itemList is an ArrayList containing
> > SelectItems.
>
> I believe #{bean.currentItem} has to return a string that matches
> SelectItem.getValue() of one of the SelectItems in the list.
>
> And when an item in the list is selected, that property will be updated
> to contain the getValue() value of the chosen SelectItem, not a
> reference to the complete SelectItem object.
>
> Regards,
>
> Simon
>