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/02 15:29:16 UTC

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

    [ http://issues.apache.org/jira/browse/MYFACES-1374?page=comments#action_12425227 ] 
            
Ken Lowther commented on MYFACES-1374:
--------------------------------------

I forgot to mention that even when I change the three pages with the selectBooleanCheckbox to their original state before MyFaces (i.e. remove the header/footer), but still use the MyFaces Libraries in place of Sun's, the behavior is unchanged and the same exception is returned as described in the original post.  Only by going back to Sun's implementation does the problem go away.

> 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