Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Binding object in a selectMenu

 
Dennis John
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic