• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Binding object in a selectMenu

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic