• 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

Data Table --> Conversion Error Occurred (!!!)

 
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an updateable resultSet from a MySQL database displayed in a Data Table.

The data type, in MySQL, for the checkbox column is currently smallint -- I've tried other data types as well (BIT, TINYINT, INTEGER...).

On my JSP (JSF) form, I have a Data Table with a checkbox.

If I check the check box and click Submit, my <h:messages/> tag says:

"_id33": Conversion error occurred.

<h:column>
<f:facet name="header">
<h utputText value="#{msgs.wasUsed}" />
</f:facet>
<h:selectBooleanCheckbox value="#{form.wasUsed}" />
<h:messages layout="table" />
</h:column>

=================

The ResultSet is updateable.

I created a boolean property with getters/setters in the Managed Bean. I've tried int, byte, and short also as data types for the property's getters/setters.

The "Core JSF" book says (page 209) that the JSF implementation will do converters for you automatically for primitive types.

------------

I'm stumped!!!

The error message is kind of helpful, but not helpful enough. I've tried changing the Managed Bean's property type, but it doesn't seem to be getting called anyway due to the "conversion error".

There are lots of posts about this but for SQL Server, not for MySQL.

===========================

Has *anybody* gotten this error and knows what I need to try next?

This is incredibly frustrating.

Thanks very very much for any ideas at all!!!

<s>

-- Mike
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The "Core JSF" book says (page 209) that the JSF implementation will do converters for you automatically for primitive types.



All my research and experience suggests that if your data is of type int coming into the page, then the rendering type won't be able to be a boolean. The conversion from int to boolean needs to happen between the data layer and the model. But I am still looking into it to be sure.
[ December 25, 2005: Message edited by: Gregg Bolinger ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic