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

Reply via email to