title: JSF 2 checkboxes and boolean getters
body: <p>I'm generating a jaxws client based on webservice. Jaxb will generate booleans using the java.lang.Boolean instead of the primitive type. In addition to this, it will generate the is() naming convention for beans.</p>
  
  <p>However if I try to link the boolean (e.g. isOptional()) to a checkbox, it will throw the following exception:</p>
  
  <pre><code>value="#{property.optional}": Property 'optional' not readable on type java.lang.Boolean
  </code></pre>
  
  <p>My google skills have informed me that jsf works fine with:</p>
  
  <pre><code> boolean isOptional()
   boolean getOptional()
   Boolean getOptional()
  </code></pre>
  
  <p>But not with</p>
  
  <pre><code>Boolean isOptional()
  </code></pre>
  
  <p>However it is not feasible to update the beans manually due to the size and amount of the webservices, so is there any way to make jsf use the java.lang.Boolean isOptional() properly? Or can I somehow define a property in the jaxb bindings file at generation time which magically generates "getOptional()"?</p>
  
  <p>On a sidenote, the following does work:</p>
  
  <pre><code>&lt;h:selectBooleanCheckbox value="#{property.isOptional()}"/&gt;
  </code></pre>
  
  <p>However I can't actually update the value presumably because it can't find the setter.</p>
  
  <p><strong>EDIT</strong>: I'm running the latest jdk 7, the output of "java -version":</p>
  
  <pre><code>java version "1.7.0_05"
  Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
  Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)
  </code></pre>
  
  <p>The output of "wsimport -version":</p>
  
  <pre><code>JAX-WS RI 2.2.4-b01
  </code></pre>
  
  <p>Generated code:</p>
  
  <pre><code>public Boolean isOptional() {
      return optional;
  }
  </code></pre>