aspose file tools*
The moose likes JSF and the fly likes Binding object in a selectMenu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Binding object in a selectMenu" Watch "Binding object in a selectMenu" New topic
Author

Binding object in a selectMenu

Dennis John
Greenhorn

Joined: Jan 30, 2004
Posts: 10
Hello, I am trying to bind an object to the value property of a selectOneMenu but cannot get it working. It does work, however, when I bind an object of type Long.

I get a conversion error where it tells me I cannot convert object@address to null. Any thoughts on if this is possible and what I am doing wrong? Here is my code.

jsp page
<h:selectOneMenu value="#{projectManager.customerId}" valueChangeListener="#{projectManager.getProjects}" onchange="submit()">
<f:selectItems value="#{projectManager.customers}"/>
</h:selectOneMenu>


Dennis John
Greenhorn

Joined: Jan 30, 2004
Posts: 10
Sorry, that is the code that works. The code that doesn't looks like this.

jsp page
<h:selectOneMenu value="#{projectManager.customer}" valueChangeListener="#{projectManager.getProjects}" onchange="submit()">
<f:selectItems value="#{projectManager.customers}"/>
</h:selectOneMenu>

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Binding object in a selectMenu