incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud MERGEY <amer...@sunopsis.com>
Subject Re: af:selectBooleanCheckbox converter problem
Date Wed, 21 Jun 2006 08:56:28 GMT
Hi,

I have checked in source code

If I use
<af:inputText label="test boolean in textfield"
                       value="#{test.boolean}"
                       converter="#{test.booleanConverter}"/>

Converter getAsString is called inside SimpleInputTextRenderer 
encodeAllAsElement method with addOnSubmitConverterValidators calling.

If I use
<af:selectBooleanCheckbox label="test boolean checkbox"
                       value="#{test.boolean}"
                       converter="#{test.booleanConverter}"/>

In SimpleSelectBooleanRenderer encodeAllAsElement doesn't call 
addOnSubmitConverterValidators so I think it is why getAsString method 
of my converter isn't called.

Is it normal issue ?, is it bug ?

Thanks for help,
Arnaud

Arnaud MERGEY a écrit :
> Hi,
>
> Why converter method  getAsString is not called in 
> selectBooleanCheckBox component ?
>
> In my page with this tag
>
> <af:selectBooleanCheckbox label="test boolean"
>                        value="#{test.boolean}"
>                        converter="#{test.booleanConverter}"/>
>
> I have a String representation of boolean in my bean (getBoolean 
> return "0" if false end "1" if true)
> My converter convert in getAsString "0" into "false" and "1" into 
> "true" and vice versa (getAsObject).
>
> Checkbox is never checked when getBoolean return "1", so I have 
> debugged my application and I can see than getASString is never called.
> getAsObject is called normally when my form is submitted.
>
> How can I configure selectBooleanCheckBox to call converter getAsString ?
>
> thanks for help
> Arnaud
>


Mime
View raw message