title: Primefaces : Select Check Box menu : NullPointerException
body: <p>I have an implementation of selectCheckBoxMenu in my project. Part of code from my xhtml file is :-</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;p:row &gt;
      &lt;p:column style=" width: 497px; text-align: right;"&gt;
          &lt;h:outputText for="toMails" value="To : " /&gt;  
      &lt;/p:column&gt;
      &lt;p:column style=" width: 497px; text-align: left;"&gt;
          &lt;p:selectCheckboxMenu id="toMails" value="#{schedule.selectedEmailIds}" label="Mail Recipients" filter="true" 
              filterText="Filter" filterMatchMode="startsWith" panelStyle="width:220px"&gt;  
              &lt;f:selectItems value="#{schedule.users}" /&gt;  
          &lt;/p:selectCheckboxMenu&gt;
      &lt;/p:column&gt;
  &lt;/p:row&gt;
  </code></pre>
  
  <p>My Bean Class has the code:-</p>
  
  <pre class="lang-java prettyprint-override"><code>private String[] selectedEmailIds;  
  
  private Map&lt;String,String&gt; users; 
  
  //Getters and Setters
  
  //Value Loader Method
  public void loadWorkFlowServices()
  {
      try
      {           
          Map&lt;String, String&gt; tmpUsers = new HashMap&lt;String, String&gt;();  
          tmpUsers.put("Scarface", "Scarface");  
          tmpUsers.put("Goodfellas", "Goodfellas");  
          tmpUsers.put("Godfather", "Godfather");  
          tmpUsers.put("Carlito's Way", "Carlito's Way"); 
          tmpUsers.put("Rang De Basanti", "Rang De Basanti"); 
          tmpUsers.put("Despicable Me", "Despicable Me"); 
          tmpUsers.put("The Dark Knight", "The Dark Knight"); 
          setUsers(tmpUsers);
      }
      catch (Exception e)
      {
          LOGGER.error("Error while loading the workflow services.", e);
      }
  }
  </code></pre>
  
  <p>When I select any value from drop down and submit it. I am getting exception -</p>
  
  <pre><code>Error occurred while doing security check on URL hit
  java.lang.NullPointerException
  at org.primefaces.component.selectcheckboxmenu.SelectCheckboxMenu.queueEvent(SelectCheckboxMenu.java:199)
  at javax.faces.component.UIInput.validate(UIInput.java:976)
  at javax.faces.component.UIInput.executeValidate(UIInput.java:1233)
  at javax.faces.component.UIInput.processValidators(UIInput.java:698)
  at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
  at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
  at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
  at javax.faces.component.UIForm.processValidators(UIForm.java:253)
  </code></pre>
  
  <p>I can't find much help online. Please suggest what I am missing.</p>