protected void encodeColOptions(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;
            }

            final JavascriptVarBuilder options = new JavascriptVarBuilder(null, true);
            options.appendProperty("type", column.getColType(), true);
            options.appendProperty("copyable", "true", false);
            final Integer width = column.getColWidth();
            String calculatedWidth = null;
            if (width != null) {
                calculatedWidth = width.toString();
            }
            // HT doesn't have a hidden property so make column small as possible will leave
            // it in the DOM, if 0 then Handsontable removes it entirely
            if (!column.isVisible()) {
                calculatedWidth = "0.1";
            }
            if (calculatedWidth != null) {
                options.appendProperty("width", calculatedWidth, false);
            }
            if (column.isReadOnly()) {
                options.appendProperty("readOnly", "true", false);
            }
            options.appendProperty("wordWrap", column.isWordWrap().toString(), false);

            // validate can be a function, regex, or string
            final String validateFunction = column.getOnvalidate();
            if (validateFunction != null) {
                boolean quoted = false;
                switch (validateFunction) {
                    case "autocomplete":
                    case "date":
                    case "numeric":
                    case "time":
                        quoted = true;
                        break;

                    default:
                        // its a function or regex!
                        quoted = false;
                        break;
                }
                options.appendProperty("validator", validateFunction, quoted);
            }

            switch (column.getColType()) {
                case "password":
                    final Integer passwordLength = column.getPasswordHashLength();
                    if (passwordLength != null) {
                        options.appendProperty("hashLength", passwordLength.toString(), false);
                    }
                    final String passwordSymbol = column.getPasswordHashSymbol();
                    if (passwordSymbol != null) {
                        options.appendProperty("hashSymbol", passwordSymbol, true);
                    }
                    break;
                case "numeric":
                    final JavascriptVarBuilder numeric = new JavascriptVarBuilder(null, true);
                    final String pattern = column.getNumericPattern();
                    if (pattern != null) {
                        numeric.appendProperty("pattern", pattern, true);
                    }
                    final String culture = column.getNumericLocale();
                    if (culture != null) {
                        numeric.appendProperty("culture", culture, true);
                    }
                    options.appendProperty("numericFormat", numeric.closeVar().toString(), false);
                    break;
                case "date":
                    options.appendProperty("dateFormat", column.getDateFormat(), true);
                    options.appendProperty("correctFormat", "true", false);
                    final String dateConfig = column.getDatePickerConfig();
                    if (dateConfig != null) {
                        options.appendProperty("datePickerConfig", dateConfig, false);
                    }
                    break;
                case "time":
                    options.appendProperty("timeFormat", column.getTimeFormat(), true);
                    options.appendProperty("correctFormat", "true", false);
                    break;
                case "dropdown":
                    encodeSelectItems(column, options);
                    break;
                case "autocomplete":
                    options.appendProperty("strict", column.isAutoCompleteStrict().toString(), false);
                    options.appendProperty("allowInvalid", column.isAutoCompleteAllowInvalid().toString(), false);
                    options.appendProperty("trimDropdown", column.isAutoCompleteTrimDropdown().toString(), false);
                    final Integer visibleRows = column.getAutoCompleteVisibleRows();
                    if (visibleRows != null) {
                        options.appendProperty("visibleRows", visibleRows.toString(), false);
                    }
                    encodeSelectItems(column, options);
                    break;
                default:
                    break;
            }

            vb.appendArrayValue(options.closeVar().toString(), false);
        }
        wb.nativeAttr("columns", vb.closeVar().toString());
    }
protected void encodeColOptions ( 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 ; } final JavascriptVarBuilder options = new JavascriptVarBuilder ( null , true ) ; options . appendProperty ( "type" , column . getColType ( ) , true ) ; options . appendProperty ( "copyable" , "true" , false ) ; final Integer width = column . getColWidth ( ) ; String calculatedWidth = null ; if ( width != null ) { calculatedWidth = width . toString ( ) ; } if ( ! column . isVisible ( ) ) { calculatedWidth = "0.1" ; } if ( calculatedWidth != null ) { options . appendProperty ( "width" , calculatedWidth , false ) ; } if ( column . isReadOnly ( ) ) { options . appendProperty ( "readOnly" , "true" , false ) ; } options . appendProperty ( "wordWrap" , column . isWordWrap ( ) . toString ( ) , false ) ; final String validateFunction = column . getOnvalidate ( ) ; if ( validateFunction != null ) { boolean quoted = false ; switch ( validateFunction ) { case "autocomplete" : case "date" : case "numeric" : case "time" : quoted = true ; break ; default : quoted = false ; break ; } options . appendProperty ( "validator" , validateFunction , quoted ) ; } switch ( column . getColType ( ) ) { case "password" : final Integer passwordLength = column . getPasswordHashLength ( ) ; if ( passwordLength != null ) { options . appendProperty ( "hashLength" , passwordLength . toString ( ) , false ) ; } final String passwordSymbol = column . getPasswordHashSymbol ( ) ; if ( passwordSymbol != null ) { options . appendProperty ( "hashSymbol" , passwordSymbol , true ) ; } break ; case "numeric" : final JavascriptVarBuilder numeric = new JavascriptVarBuilder ( null , true ) ; final String pattern = column . getNumericPattern ( ) ; if ( pattern != null ) { numeric . appendProperty ( "pattern" , pattern , true ) ; } final String culture = column . getNumericLocale ( ) ; if ( culture != null ) { numeric . appendProperty ( "culture" , culture , true ) ; } options . appendProperty ( "numericFormat" , numeric . closeVar ( ) . toString ( ) , false ) ; break ; case "date" : options . appendProperty ( "dateFormat" , column . getDateFormat ( ) , true ) ; options . appendProperty ( "correctFormat" , "true" , false ) ; final String dateConfig = column . getDatePickerConfig ( ) ; if ( dateConfig != null ) { options . appendProperty ( "datePickerConfig" , dateConfig , false ) ; } break ; case "time" : options . appendProperty ( "timeFormat" , column . getTimeFormat ( ) , true ) ; options . appendProperty ( "correctFormat" , "true" , false ) ; break ; case "dropdown" : encodeSelectItems ( column , options ) ; break ; case "autocomplete" : options . appendProperty ( "strict" , column . isAutoCompleteStrict ( ) . toString ( ) , false ) ; options . appendProperty ( "allowInvalid" , column . isAutoCompleteAllowInvalid ( ) . toString ( ) , false ) ; options . appendProperty ( "trimDropdown" , column . isAutoCompleteTrimDropdown ( ) . toString ( ) , false ) ; final Integer visibleRows = column . getAutoCompleteVisibleRows ( ) ; if ( visibleRows != null ) { options . appendProperty ( "visibleRows" , visibleRows . toString ( ) , false ) ; } encodeSelectItems ( column , options ) ; break ; default : break ; } vb . appendArrayValue ( options . closeVar ( ) . toString ( ) , false ) ; } wb . nativeAttr ( "columns" , vb . closeVar ( ) . toString ( ) ) ; }
Encode the column options

@param context
@param sheet
@param wb
@throws IOException