You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Arnaud MERGEY (JIRA)" <ad...@incubator.apache.org> on 2006/06/23 14:36:30 UTC
[jira] Created: (ADFFACES-38) Converter getAsString isn't called in
af:selectBooleanCheckBox
Converter getAsString isn't called in af:selectBooleanCheckBox
--------------------------------------------------------------
Key: ADFFACES-38
URL: http://issues.apache.org/jira/browse/ADFFACES-38
Project: MyFaces ADF-Faces
Type: Bug
Reporter: Arnaud MERGEY
Priority: Critical
I use in a page 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
in converter:
* getAsString is never called.
* getAsObject is called normally when my form is submitted String param in getAsObject is "false" if my checkbox isn't checked and "true" if my checkbox is checked.
selectBooleanCheckbox working isn't "symetric" so I think it is a trinidad bug.
I have checked source code in
SimpleSelectBooleanRenderer.encodeAllAsElement
and SimpleSelectBooleanRenderer.encodeAllAsNonElement
I have replaced code
Object value = getSubmittedValue(bean);
if ( value == null)
value = getValue(bean);
by this one
Object value = getSubmittedValue(bean);
if ( value == null)
{
value = getValue(bean);
}
if(!(value instanceof Boolean))
{
value=Boolean.valueOf(getConvertedString(context, component, bean));
}
this "patch" works in af:selectBooleanCheckbox value can be boolean or String "true " or "false" and converter can be used to convert custom boolean representation, but I don't know if it is right place to correct this trinidad bug
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-38) Converter getAsString isn't called in
af:selectBooleanCheckBox
Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Weßendorf updated ADFFACES-38:
---------------------------------------
Fix Version/s: 1.0.0-incubating-core
Affects Version/s: 1.0.0-incubating-core
> Converter getAsString isn't called in af:selectBooleanCheckBox
> --------------------------------------------------------------
>
> Key: ADFFACES-38
> URL: https://issues.apache.org/jira/browse/ADFFACES-38
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Affects Versions: 1.0.0-incubating-core
> Reporter: Arnaud MERGEY
> Assigned To: Adam Winer
> Priority: Critical
> Fix For: 1.0.0-incubating-core
>
> Attachments: SimpleSelectBooleanRenderer.patch
>
>
> I use in a page 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
> in converter:
> * getAsString is never called.
> * getAsObject is called normally when my form is submitted String param in getAsObject is "false" if my checkbox isn't checked and "true" if my checkbox is checked.
> selectBooleanCheckbox working isn't "symetric" so I think it is a trinidad bug.
> I have checked source code in
> SimpleSelectBooleanRenderer.encodeAllAsElement
> and SimpleSelectBooleanRenderer.encodeAllAsNonElement
> I have replaced code
> Object value = getSubmittedValue(bean);
> if ( value == null)
> value = getValue(bean);
> by this one
> Object value = getSubmittedValue(bean);
> if ( value == null)
> {
> value = getValue(bean);
> }
> if(!(value instanceof Boolean))
> {
> value=Boolean.valueOf(getConvertedString(context, component, bean));
> }
> this "patch" works in af:selectBooleanCheckbox value can be boolean or String "true " or "false" and converter can be used to convert custom boolean representation, but I don't know if it is right place to correct this trinidad bug
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ADFFACES-38) Converter getAsString isn't called in
af:selectBooleanCheckBox
Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-38?page=all ]
Adam Winer updated ADFFACES-38:
-------------------------------
Status: Resolved (was: Patch Available)
Resolution: Fixed
Checked in to SVN revision 421664. Thanks!
> Converter getAsString isn't called in af:selectBooleanCheckBox
> --------------------------------------------------------------
>
> Key: ADFFACES-38
> URL: http://issues.apache.org/jira/browse/ADFFACES-38
> Project: MyFaces ADF-Faces
> Type: Bug
> Reporter: Arnaud MERGEY
> Assignee: Adam Winer
> Priority: Critical
> Attachments: SimpleSelectBooleanRenderer.patch
>
> I use in a page 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
> in converter:
> * getAsString is never called.
> * getAsObject is called normally when my form is submitted String param in getAsObject is "false" if my checkbox isn't checked and "true" if my checkbox is checked.
> selectBooleanCheckbox working isn't "symetric" so I think it is a trinidad bug.
> I have checked source code in
> SimpleSelectBooleanRenderer.encodeAllAsElement
> and SimpleSelectBooleanRenderer.encodeAllAsNonElement
> I have replaced code
> Object value = getSubmittedValue(bean);
> if ( value == null)
> value = getValue(bean);
> by this one
> Object value = getSubmittedValue(bean);
> if ( value == null)
> {
> value = getValue(bean);
> }
> if(!(value instanceof Boolean))
> {
> value=Boolean.valueOf(getConvertedString(context, component, bean));
> }
> this "patch" works in af:selectBooleanCheckbox value can be boolean or String "true " or "false" and converter can be used to convert custom boolean representation, but I don't know if it is right place to correct this trinidad bug
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (ADFFACES-38) Converter getAsString isn't called
in af:selectBooleanCheckBox
Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-38?page=all ]
Adam Winer reassigned ADFFACES-38:
----------------------------------
Assign To: Adam Winer
> Converter getAsString isn't called in af:selectBooleanCheckBox
> --------------------------------------------------------------
>
> Key: ADFFACES-38
> URL: http://issues.apache.org/jira/browse/ADFFACES-38
> Project: MyFaces ADF-Faces
> Type: Bug
> Reporter: Arnaud MERGEY
> Assignee: Adam Winer
> Priority: Critical
> Attachments: SimpleSelectBooleanRenderer.patch
>
> I use in a page 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
> in converter:
> * getAsString is never called.
> * getAsObject is called normally when my form is submitted String param in getAsObject is "false" if my checkbox isn't checked and "true" if my checkbox is checked.
> selectBooleanCheckbox working isn't "symetric" so I think it is a trinidad bug.
> I have checked source code in
> SimpleSelectBooleanRenderer.encodeAllAsElement
> and SimpleSelectBooleanRenderer.encodeAllAsNonElement
> I have replaced code
> Object value = getSubmittedValue(bean);
> if ( value == null)
> value = getValue(bean);
> by this one
> Object value = getSubmittedValue(bean);
> if ( value == null)
> {
> value = getValue(bean);
> }
> if(!(value instanceof Boolean))
> {
> value=Boolean.valueOf(getConvertedString(context, component, bean));
> }
> this "patch" works in af:selectBooleanCheckbox value can be boolean or String "true " or "false" and converter can be used to convert custom boolean representation, but I don't know if it is right place to correct this trinidad bug
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-38) Converter getAsString isn't called in
af:selectBooleanCheckBox
Posted by "Pierre-Luc Archambault (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-38?page=all ]
Pierre-Luc Archambault updated ADFFACES-38:
-------------------------------------------
Attachment: SimpleSelectBooleanRenderer.patch
I created a patch file for the solution A. Mergey provided in text.
After testing his solution, I got the same working result with this patch provided. Up to a commiter to review this!
thx
> Converter getAsString isn't called in af:selectBooleanCheckBox
> --------------------------------------------------------------
>
> Key: ADFFACES-38
> URL: http://issues.apache.org/jira/browse/ADFFACES-38
> Project: MyFaces ADF-Faces
> Type: Bug
> Reporter: Arnaud MERGEY
> Priority: Critical
> Attachments: SimpleSelectBooleanRenderer.patch
>
> I use in a page 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
> in converter:
> * getAsString is never called.
> * getAsObject is called normally when my form is submitted String param in getAsObject is "false" if my checkbox isn't checked and "true" if my checkbox is checked.
> selectBooleanCheckbox working isn't "symetric" so I think it is a trinidad bug.
> I have checked source code in
> SimpleSelectBooleanRenderer.encodeAllAsElement
> and SimpleSelectBooleanRenderer.encodeAllAsNonElement
> I have replaced code
> Object value = getSubmittedValue(bean);
> if ( value == null)
> value = getValue(bean);
> by this one
> Object value = getSubmittedValue(bean);
> if ( value == null)
> {
> value = getValue(bean);
> }
> if(!(value instanceof Boolean))
> {
> value=Boolean.valueOf(getConvertedString(context, component, bean));
> }
> this "patch" works in af:selectBooleanCheckbox value can be boolean or String "true " or "false" and converter can be used to convert custom boolean representation, but I don't know if it is right place to correct this trinidad bug
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-38) Converter getAsString isn't called in
af:selectBooleanCheckBox
Posted by "Arnaud MERGEY (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-38?page=all ]
Arnaud MERGEY updated ADFFACES-38:
----------------------------------
Status: Patch Available (was: Open)
> Converter getAsString isn't called in af:selectBooleanCheckBox
> --------------------------------------------------------------
>
> Key: ADFFACES-38
> URL: http://issues.apache.org/jira/browse/ADFFACES-38
> Project: MyFaces ADF-Faces
> Type: Bug
> Reporter: Arnaud MERGEY
> Priority: Critical
>
> I use in a page 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
> in converter:
> * getAsString is never called.
> * getAsObject is called normally when my form is submitted String param in getAsObject is "false" if my checkbox isn't checked and "true" if my checkbox is checked.
> selectBooleanCheckbox working isn't "symetric" so I think it is a trinidad bug.
> I have checked source code in
> SimpleSelectBooleanRenderer.encodeAllAsElement
> and SimpleSelectBooleanRenderer.encodeAllAsNonElement
> I have replaced code
> Object value = getSubmittedValue(bean);
> if ( value == null)
> value = getValue(bean);
> by this one
> Object value = getSubmittedValue(bean);
> if ( value == null)
> {
> value = getValue(bean);
> }
> if(!(value instanceof Boolean))
> {
> value=Boolean.valueOf(getConvertedString(context, component, bean));
> }
> this "patch" works in af:selectBooleanCheckbox value can be boolean or String "true " or "false" and converter can be used to convert custom boolean representation, but I don't know if it is right place to correct this trinidad bug
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira