javaScriptWriter.write('=').writeCall(null, "_addSubItem").write(
javaScriptWriter.write('=').writeMethodCall("_addSubItem").write(
    public int encodeNodeBegin(UIComponent component, SelectItem selectItem,            boolean hasChildren, boolean isVisible) throws WriterException {        SelectItemsJsContext ctx = (SelectItemsJsContext) getContext();        String varId = javaScriptWriter.getJavaScriptRenderContext()                .allocateVarName();        String parentVarId = null;        if (ctx.getDepth() > 1) {            parentVarId = ctx.peekVarId();        }        ctx.pushVarId(varId);        String imageURL = null;        if (selectItem instanceof IImagesSelectItem) {            imageURL = ((BasicImagesSelectItem) selectItem).getImageURL();            imageURL = javaScriptWriter.allocateString(imageURL);        }        javaScriptWriter.write("var ").write(varId);        if (parentVarId != null) {            javaScriptWriter.write('=').writeCall(null, "_addSubItem").write(                    parentVarId).write(',');        } else {            javaScriptWriter.write('=').writeCall(null, "_addItem");        }        String label = selectItem.getLabel();        if (label == null) {            label = "";        }        javaScriptWriter.writeString(label);        javaScriptWriter.write(',');        String value = convertItemValue(javaScriptWriter                .getComponentRenderContext(), selectItem.getValue());        if (value != null) {            javaScriptWriter.writeString(value);        } else {            javaScriptWriter.writeNull();        }        boolean disabled = selectItem.isDisabled();        if (imageURL != null) {            javaScriptWriter.write(',').write(imageURL);        } else if (disabled) {            javaScriptWriter.write(',').writeNull();        }        if (disabled) {            javaScriptWriter.write(',').writeBoolean(true);        }        javaScriptWriter.writeln(");");        return EVAL_NODE;    }