title: How to validate p:pickList to require at least one selection
body: <p>I have used column picklist to customize columns of table on page and I want to show dialog  message (Atleast one column should be enabled) if user disables all the columns from picklist. That means user should keep atleast one column in enable box.</p>
  
  <pre><code>&lt;p:dialog id="pickListDialog" header="Customize View"
                          widgetVar="dlg"&gt;
                          &lt;h:panelGrid&gt;
                              &lt;p:pickList id="columnPickList"
                                  value="#{Class_Name.columns}" var="col"
                                  itemLabel="#{Class_Name.columnPickList.columnsDisplayMap.get(col)}"
                                  itemValue="#{col}"&gt;
                                  &lt;f:facet name="sourceCaption"&gt;Disabled&lt;/f:facet&gt;
                                  &lt;f:facet name="targetCaption"&gt;Enabled&lt;/f:facet&gt;
                              &lt;/p:pickList&gt;
  
                              &lt;p:commandButton value="Submit"
                                  actionListener="#{Class_Name.columnPickList.saveColumns}" onclick="return disableClick();"
                                  ajax="false" /&gt;
                          &lt;/h:panelGrid&gt;
                      &lt;/p:dialog&gt;
  </code></pre>
  
  <p>Javascript method -</p>
  
  <pre><code>function disableClick(){   
          if (document.getElementById("form:columnPickList_target").value == ""){
      alert("Please Select Atleast One Field");       
      return false;      
          }
      }
  </code></pre>
  
  <p>Here I have used Javascript for this. But I want to do this by JSF . 
  can anyone please tell me ?</p>