MyFaces Core
  1. MyFaces Core
  2. MYFACES-1592

cannot render selectBooleanCheckbox tag when a boolean value is supplied


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: JSR-252
    • Labels:


      The tag descriptor generated by the maven plugin for HtmlSelectBooleanCheckboxTag has the following attribute:
      <description><![CDATA[The initial value of this component.]]></description>

      So when a JSP contains a tag like this:
      <h:selectBooleanCheckbox id="foo1" value="true"/>

      The following unhandled exception is thrown:
      javax.servlet.ServletException: Expected submitted value of type Boolean for Component :

      {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /mytest.jsp][Class: javax.faces.component.html.HtmlForm,Id: form][Class: javax.faces.component.html.HtmlSelectBooleanCheckbox,Id: foo1]}

      at javax.faces.webapp.FacesServlet.service(
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(
      at org.apache.catalina.core.StandardWrapperValve.invoke(
      at org.apache.catalina.core.StandardContextValve.invoke(
      at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(
      at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(
      at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(
      at org.apache.catalina.core.StandardHostValve.invoke(
      at org.apache.catalina.valves.ErrorReportValve.invoke(
      at org.apache.catalina.core.StandardEngineValve.invoke(
      at org.apache.catalina.valves.AccessLogValve.invoke(
      at org.apache.catalina.connector.CoyoteAdapter.service(
      at org.apache.coyote.http11.Http11Processor.process(
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(

      This exception is thrown because RendererUtils.getBooleanValue() expects HtmlSelectBooleanCheckbox.getValue() to return a Boolean but instead it returns an Object. Changing the type for the "value" attribute in h.tld as shown below avoids the exception and passes the currently failing TCK test for that component:
      <description><![CDATA[The initial value of this component.]]></description>

      1. MYFACES-1592.patch
        0.8 kB
        Martin Haimberger


        Paul McMahan created issue -
        Martin Haimberger made changes -
        Field Original Value New Value
        Assignee Martin Haimberger [ martin.haimberger ]
        Martin Haimberger made changes -
        Attachment MYFACES-1592.patch [ 12356063 ]
        Paul McMahan made changes -
        Fix Version/s 1.2.0-SNAPSHOT [ 12311938 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Matthias Weßendorf made changes -
        Affects Version/s 1.2.0-SNAPSHOT [ 12311938 ]
        Fix Version/s 1.2.0-SNAPSHOT [ 12311938 ]
        Affects Version/s  1.2.0 [ 12312576 ]
        Fix Version/s  1.2.0 [ 12312576 ]
        Matthias Weßendorf made changes -
        Status Resolved [ 5 ] Closed [ 6 ]


          • Assignee:
            Martin Haimberger
            Paul McMahan
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: