javaScriptWriter.writeCall(null, "_appendDateItem");
javaScriptWriter.writeMethodCall("_appendDateItem");
    public int encodeNodeBegin(UIComponent component, SelectItem selectItem,            boolean hasChildren, boolean isVisible) throws WriterException {        count++;        if (maxResultNumber > 0 && count > maxResultNumber) {            return SKIP_NODE;        }        Object selectItemValue = selectItem.getValue();        if (selectItemValue == null) {            return EVAL_NODE;        }        javaScriptWriter.writeCall(null, "_appendDateItem");        StringAppender sb = new StringAppender(32);        if (selectItemValue instanceof Date) {            AbstractCalendarRenderer.appendDate(calendar,                    (Date) selectItemValue, sb, onlyDay);        } else if (selectItemValue instanceof Date[]) {            AbstractCalendarRenderer.appendDates(calendar,                    (Date[]) selectItemValue, sb, onlyDay);        } else if (selectItemValue instanceof Date[][]) {            AbstractCalendarRenderer.appendPeriods(calendar,                    (Date[][]) selectItemValue, sb, onlyDay);        } else {            throw new FacesException("Invalid value for date '"                    + selectItemValue + "'.");        }        javaScriptWriter.writeString(sb.toString());        int pred = 0;        String text = selectItem.getLabel();        if (text != null) {            javaScriptWriter.write(',').writeString(text);        } else {            pred++;        }        if (selectItem.isDisabled()) {            for (; pred > 0; pred--) {                javaScriptWriter.write(',').writeNull();            }            javaScriptWriter.write(',').writeBoolean(true);        } else {            pred++;        }        if (selectItem instanceof IStyleClassItem) {            IStyleClassItem dateSelectItem = (IStyleClassItem) selectItem;            String layer = dateSelectItem.getStyleClass();            if (layer != null) {                for (; pred > 0; pred--) {                    javaScriptWriter.write(',').writeNull();                }                javaScriptWriter.write(',').writeString(layer);            } else {                pred++;            }        }        if (selectItem instanceof IClientDataSelectItem) {            IClientDataSelectItem clientDataItem = (IClientDataSelectItem) selectItem;            if (clientDataItem.isClientDataEmpty() == false) {                for (; pred > 0; pred--) {                    javaScriptWriter.write(',').writeNull();                }                Map map = clientDataItem.getClientDataMap();                for (Iterator it = map.entrySet().iterator(); it.hasNext();) {                    Map.Entry entry = (Map.Entry) it.next();                    String key = (String) entry.getKey();                    Object data = entry.getValue();                    if (data != null) {                        data = String.valueOf(data);                    }                    javaScriptWriter.write(',').writeString(key).write(',')                            .writeString((String) data);                }            } else {                pred++;            }        }        javaScriptWriter.writeln(");");        return EVAL_NODE;    }