title: Overriding the SelectCheckboxMenuRenderer in PrimeFaces to implement a GroupedSelectBoxMenuRenderer
body: <p>I am trying to override the SelectCheckboxMenuRenderer provided by PrimeFaces to create something like a GroupedSelectCheckboxMenuRenderer. My component needs to have a Grouped select checkbox list like:
  Regions select checkbox</p>
  
  <p><strong>X Asia</strong></p>
  
  <pre><code>X India
  X SriLanka
  </code></pre>
  
  <p><strong>X Europe</strong></p>
  
  <pre><code>X Italy
  X Greece
  X Germany
  </code></pre>
  
  <p>If somebody selects 'Europe checkbox' then all in Europe list are selected. 
  For UI and event handling side what all is required to be done? 
  I know that in <strong>faces-config.xml</strong> I need to have the renderer class:</p>
  
  <pre><code>&lt;render-kit&gt;
      &lt;renderer&gt;
          &lt;component-family&gt;org.primefaces.component&lt;/component-family&gt;
          &lt;renderer-type&gt;org.primefaces.component.SelectCheckboxMenuRenderer&lt;/renderer-type&gt;
          &lt;renderer-class&gt;com.cswi.codeworx.jsf.GroupedSelectCheckboxMenuRenderer&lt;/renderer-class&gt;
      &lt;/renderer&gt;
  &lt;/render-kit&gt;
  </code></pre>
  
  <p>and override PrimeFaces org.primefaces.component.SelectCheckboxMenuRenderer.</p>
  
  <p>Apart from this what all XHTML / Class file changes do I need to do I need to do to have the visual rendering and of the GroupedSelectCheckboxMenuRenderer ? Any pointers to any such existing component would be very welcome.</p>