It's not a secret anymore!
The moose likes JSF and the fly likes Configuring and using seam's convertEntity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Configuring and using seam Watch "Configuring and using seam New topic

Configuring and using seam's convertEntity

Felipe Reis

Joined: Oct 31, 2007
Posts: 20
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

Joined: Oct 31, 2007
Posts: 20
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...

Dean Hiller

Joined: Apr 07, 2003
Posts: 1
If you want that feature to work, go here and vote for this

they are considering making a component that works like selectOneMenu. rich:comboBox does NOT work like selectOneMenu!!!
Have you checked out Aspose?
subject: Configuring and using seam's convertEntity
jQuery in Action, 3rd edition