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 01:49:14 UTC

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

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

        

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

Posted by "Ken Lowther (JIRA)" <de...@myfaces.apache.org>.
    [ 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

        

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

Posted by "Ken Lowther (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1374?page=comments#action_12425234 ] 
            
Ken Lowther commented on MYFACES-1374:
--------------------------------------

It would probably help more if I posted the root exception instead of the one I posted:

java.lang.IllegalArgumentException: Expected submitted value of type Boolean for Component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /LMMaintenance/manageOrderCategories.jsp][Class: javax.faces.component.html.HtmlForm,Id: manageProductCategory][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id3][Class: javax.faces.component.UISelectBoolean,Id: CategoryStatus]}
	org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.getBooleanValue(RendererUtils.java:151)
	org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlCheckboxRendererBase.encodeEnd(HtmlCheckboxRendererBase.java:60)
	org.apache.myfaces.renderkit.html.ext.HtmlCheckboxRenderer.encodeEnd(HtmlCheckboxRenderer.java:87)
	javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
	org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:442)
	org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
	org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)
	javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
	javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:616)
	javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:539)
	com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)


> 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

        

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

Posted by "Ken Lowther (JIRA)" <de...@myfaces.apache.org>.
     [ 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