• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Configuring and using seam's convertEntity

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone.

I'm trying to use the convertEntity tag from Jboss Seam in a <rich:comboBox> but I'm cannot manage to make it work.

I've read at the documentation that:

You must use Seam managed transactions (see Section 9.2, “Seam managed transactions”) with <s:convertEntity />.



So firstly I've worked on that... As I'm not using EJB and JTA transactions I've added this:

to my components.xml.

Then, I've inserted this

to my components.xml. I don't really understand why, but it was in the docs.

My .xhtml looks like this:


What I got as a result is a combobox that displays correctly, however, when I submit the form, I get the following error:

java.lang.NumberFormatException: For input string: ""


I assume that the value from the id is not being passed to the entity converter...

Has anyone had this problem before?



 
Felipe Reis
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, there is yet another problem. The displaying of the combobox is faulty too, it shows the id values instead of what is written in the label attribute...

Disappointing.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want that feature to work, go here and vote for this

https://jira.jboss.org/jira/browse/RF-5046

they are considering making a component that works like selectOneMenu. rich:comboBox does NOT work like selectOneMenu!!!
 
crispy bacon. crispy tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic