title: javax.el.PropertyNotFoundException: The class ' does not have a readable property 'preference'
body: <p>I have been through almost all the related questions on SO but couldn't find the answer because I don't have the issues that were the cause of errors for other still I've same error result.</p>
  
  <p>I have implemented a primefaces <strong>selectBooleanButton</strong> element and included the bean code as per that only. The error means that the system is unable to read the property of the managedBean but I have proper getter/setter methods as it should be for boolean property. Below is the code for reference:</p>
  
  <p><strong>View</strong></p>
  
  <pre><code>    &lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"&gt;
    &lt;ui:composition template="/templates/common/public.xhtml"&gt;
      &lt;ui:define name="title"&gt;Search&lt;/ui:define&gt;
      &lt;ui:define name="content"&gt;
        &lt;div class="ui-grid ui-grid-responsive"&gt;
          &lt;div class="ui-grid-row"&gt;
            &lt;div class="ui-grid-col-10" id="mainCol"&gt;
              &lt;h:form id="search"&gt;
                &lt;h:panelGrid columns="2" cellpadding="5"&gt;
                &lt;h:outputText value="Choose: " /&gt;
                &lt;p:selectBooleanButton id="preference" value="#{searchForm.preference}" onLabel="Yes" offLabel="No" style="width:60px" /&gt;
              &lt;/h:form&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/ui:define&gt;
    &lt;/ui:composition&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Bean:</strong></p>
  
  <pre><code>@Named
  @SessionScoped
  public class SearchForm {
  
    private boolean preference;
  
    public boolean isPreference() {
        return preference;
    }
  
    public void setPreference(boolean preference) {
        this.preference = preference;
    }
  }
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>[glassfish 4.1] [SEVERE] [] [javax.enterprise.resource.webcontainer.jsf.application] [tid: _ThreadID=26 _ThreadName=http-listener-1(2)] [timeMillis: 1488954548903] [levelValue: 1000] [[
    Error Rendering View[/search/searchForm.xhtml]
  javax.el.PropertyNotFoundException: /search/searchForm.xhtml @49,156 value="#{searchForm.preference}": The class 'com.pc.SearchForm' does not have a readable property 'preference'.
  </code></pre>
  
  <p>Please suggest.</p>