code: protected void encodeFilterVar(final FacesContext context, final Sheet sheet, final WidgetBuilder wb)
                  throws IOException {
          final JavascriptVarBuilder vb = new JavascriptVarBuilder(null, false);
  
          for (final SheetColumn column : sheet.getColumns()) {
              if (!column.isRendered()) {
                  continue;
              }
  
              if (column.getValueExpression("filterBy") == null) {
                  vb.appendArrayValue("false", true);
                  continue;
              }
  
              final Collection<SelectItem> options = column.getFilterOptions();
              if (options == null) {
                  vb.appendArrayValue("true", true);
              }
              else {
                  final JavascriptVarBuilder vbOptions = new JavascriptVarBuilder(null, false);
                  for (final SelectItem item : options) {
                      vbOptions.appendArrayValue(
                                  "{ label: \"" + item.getLabel() + "\", value: \"" + item.getValue() + "\"}", false);
                  }
                  vb.appendArrayValue(vbOptions.closeVar().toString(), false);
              }
  
          }
          wb.nativeAttr("filters", vb.closeVar().toString());
      }
docs: Encodes a javascript filter var that informs the col header event of the column's filtering options. The var is an array in the form:
  
  <pre>
  ["false","true",["option 1", "option 2"]]
  </pre>
  
  False indicates no filtering for the column. True indicates simple input text filter. Array of values indicates a drop down filter with the listed
  options.
  
  @param context
  @param sheet
  @param wb
  @throws IOException