title: primefaces checkbox not binding
body: <p>Hi I´m doing an upolading images system , the upload method is fine but I have a simple checkbox in but when I wanna retrive the value, never was binded.</p>
  
  <p>My JSF</p>
  
  <pre><code>    &lt;h:body&gt;
  
  &lt;h:form&gt;
      &lt;h:panelGrid columns="2" cellpadding="2"&gt;
  
          &lt;p:panel id="panel" header="Local import"&gt;
  
              &lt;p:fileUpload style="padding:10px"
                  fileUploadListener="#{fileUploadView.handleFileUpload}"
                  mode="advanced" dragDropSupport="false" multiple="true"
                  update="messages" sizeLimit="900000" fileLimit="100"
                  allowTypes="/(\.|\/)(gif|jpe?g|png)$/" /&gt;
  
              &lt;p:growl id="messages" showDetail="true" /&gt;
  
              &lt;p:outputLabel for="category" value="Category" /&gt;
              &lt;p:inputText id="category" value="#{fileUploadView.path}"
                  required="true" label="Path"&gt;
                  &lt;f:validateLength minimum="1" /&gt;
                  &lt;p:ajax update="msgCategory" event="keyup" /&gt;
              &lt;/p:inputText&gt;
              &lt;p:message for="category" id="msgCategory" display="icon" /&gt;
  
              &lt;p:outputLabel for="document" value="Is a single document." /&gt;
              &lt;p:selectBooleanCheckbox style="padding:10px"
                  value="#{fileUpload.singleDocument}" id="document" /&gt;
          &lt;/p:panel&gt;
  
  
      &lt;/h:panelGrid&gt;
  
  &lt;/h:form&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is the managed bean, is setted in  session scoope.</p>
  
  <pre><code>import java.io.File;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  
  import javax.faces.application.FacesMessage;
  import javax.faces.bean.ManagedBean;
  import javax.faces.context.FacesContext;
  
  import org.primefaces.event.FileUploadEvent;
  
  @ManagedBean
  
  public class FileUpload {
  
  private String path = null;
  private Boolean singleDocument;
  
  public void handleFileUpload(FileUploadEvent event) {
      FacesMessage message = new FacesMessage("Succesful", event.getFile()
              .getFileName() + " is uploaded.");
      FacesContext.getCurrentInstance().addMessage(null, message);
      try {
          copyFile(event.getFile().getFileName(), event.getFile()
                  .getInputstream());
      } catch (IOException e) {
          e.printStackTrace();
      }
  }
  
  public void copyFile(String fileName, InputStream in) {
      try {
  
          // write the inputStream to a FileOutputStream
          OutputStream out = new FileOutputStream(new File(path + fileName));
          System.out.println(path + fileName);
          int read = 0;
          byte[] bytes = new byte[1024];
  
          while ((read = in.read(bytes)) != -1) {
              out.write(bytes, 0, read);
          }
  
          in.close();
          out.flush();
          out.close();
  
          System.out.println("New file created!");
          System.out.println(singleDocument);
      } catch (IOException e) {
          System.out.println(e.getMessage());
      }
  }
  
  // Getters and setters
  
  public String getPath() {
      return path;
  }
  
  public void setPath(String path) {
      this.path = path;
  }
  
  public Boolean getSingleDocument() {
      return singleDocument;
  }
  
  public void setSingleDocument(Boolean singleDocument) {
      this.singleDocument = singleDocument;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks in advance for your time and answers</p>