You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Cosma Colanicchia <co...@gmail.com> on 2006/05/09 17:11:16 UTC

selectBooleanCheckBox and non-boolean attributes: is it possible?

Hi,

I'm trying to use <h:selectBooleanCheckBox> with a non-boolean
backing-bean attribute like this:

<h:selectBooleanCheckbox value="#{peopleAction.person.fgObsoleto}">
    <s:convertBoolean trueValue="1" falseValue="0"/>
</h:selectBooleanCheckbox>

"s" prefix is mapped to tomahawk-sandbox.. but it fails with the
exception "javax.faces.FacesException:
Expected submitted value of type Boolean for Component", exactly as it
does without the converter tag.
I've read somewhere that the RI for h:selectBooleanCheckBox doesn't
allow use of converters at all, Is
this true also for MyFaces implementation?

I'd really need a way to put a checkbox on my form for non-boolean
values, do you know some solution
for this issue?

TIA
Cosma