You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ken Lowther (JIRA)" <de...@myfaces.apache.org> on 2006/08/03 22:08:15 UTC

[jira] Resolved: (MYFACES-1374) Using selectBooleanCheckbox with binding attribute causes "Expected submitted value of type Boolean" exception

     [ http://issues.apache.org/jira/browse/MYFACES-1374?page=all ]

Ken Lowther resolved MYFACES-1374.
----------------------------------

    Resolution: Invalid

This was NOT a bug in MyFaces, but was related to the values being set for the UISelectBoolean's submittedValue when it the form was reloaded because of a change in data in another field, and did not occur during form submission.  Again this was NOT a bug.

> Using selectBooleanCheckbox with binding attribute causes "Expected submitted value of type Boolean" exception
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1374
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1374
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 1.1.3
>         Environment: Windows XP Professional SP 1
>            Reporter: Ken Lowther
>            Priority: Minor
>
> I have an application that was using straight JSF (no MyFaces).  I introduced MyFaces to add a navigation menu to the site.  With no code changes to the pages that have the selectBooleanCheckbox, except for an include of the new header/footer, the selectBooleanCheckboxes no longer function in that they throw an exception when the page loads.  A similar exception occurs on three different pages in the app, and it used to function correctly.  Here is the exception:
> javax.servlet.ServletException: javax.servlet.jsp.JspException: Expected submitted value of type Boolean for Component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /LMMaintenance/manageProductModules.jsp][Class: javax.faces.component.html.HtmlForm,Id: manageProductModule][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id3][Class: javax.faces.component.UISelectBoolean,Id: ModuleStatus]}
> 	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:844)
> 	org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:65)
> 	org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:768)
> 	java.security.AccessController.doPrivileged(Native Method)
> 	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:766)
> Here is a code snippet from one of the three pages:
> 				<h:selectBooleanCheckbox id="CategoryStatus"
> 				 value="#{ManageCategoryBean.categoryStatus}"
> 				 required="true"
> 				 binding="#{ManageCategoryBean.uiCategoryStatus}">
> 				</h:selectBooleanCheckbox>
> The backing ManageCategoryBean has a getter/setter for categoryStatus (Boolean) and uiCategoryStatus (UISelectBoolean).  When the binding attribute is removed, the issue is resolved, however, then the behavior for the application is incorrect as the value is not loaded onto the screen correctly.  This was what was working (perhaps by chance) with the Sun's JSF implementation.  Perhaps I need to use a different type in the backing bean for these checkboxes, but I haven't found any documentation to indicate that to date.

-- 
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