javaScriptWriter.writeCall(null, "_setDefaultImages");
javaScriptWriter.writeMethodCall("_setDefaultImages");
    protected void encodeComponentsBegin() throws WriterException {        super.encodeComponentsBegin();        TreeRenderContext treeRenderContext = (TreeRenderContext) getContext();        TreeComponent treeComponent = (TreeComponent) treeRenderContext                .getRootComponent();        FacesContext facesContext = javaScriptWriter.getFacesContext();        boolean write = false;        String urls[] = new String[8];        String defaultImageURL = treeComponent.getDefaultImageURL(facesContext);        if (defaultImageURL != null) {            write = true;            urls[0] = javaScriptWriter.allocateString(defaultImageURL);        }        String defaultExpandedImageURL = treeComponent                .getDefaultExpandedImageURL(facesContext);        if (defaultExpandedImageURL != null) {            write = true;            urls[1] = javaScriptWriter.allocateString(defaultExpandedImageURL);        }        String defaultSelectedImageURL = treeComponent                .getDefaultSelectedImageURL(facesContext);        if (defaultSelectedImageURL != null) {            write = true;            urls[2] = javaScriptWriter.allocateString(defaultSelectedImageURL);        }        String defaultDisabledImageURL = treeComponent                .getDefaultDisabledImageURL(facesContext);        if (defaultDisabledImageURL != null) {            write = true;            urls[3] = javaScriptWriter.allocateString(defaultDisabledImageURL);        }        String defaultLeafImageURL = treeComponent                .getDefaultLeafImageURL(facesContext);        if (defaultLeafImageURL != null) {            write = true;            urls[4] = javaScriptWriter.allocateString(defaultLeafImageURL);        }        String defaultExpandedLeafImageURL = treeComponent                .getDefaultExpandedLeafImageURL(facesContext);        if (defaultExpandedLeafImageURL != null) {            write = true;            urls[5] = javaScriptWriter                    .allocateString(defaultExpandedLeafImageURL);        }        String defaultSelectedLeafImageURL = treeComponent                .getDefaultSelectedLeafImageURL(facesContext);        if (defaultSelectedLeafImageURL != null) {            write = true;            urls[6] = javaScriptWriter                    .allocateString(defaultSelectedLeafImageURL);        }        String defaultDisabledLeafImageURL = treeComponent                .getDefaultDisabledLeafImageURL(facesContext);        if (defaultDisabledLeafImageURL != null) {            write = true;            urls[7] = javaScriptWriter                    .allocateString(defaultDisabledLeafImageURL);        }        if (write == false) {            return;        }        javaScriptWriter.writeCall(null, "_setDefaultImages");        int pred = 0;        for (int i = 0; i < urls.length; i++) {            String url = urls[i];            if (url == null) {                pred++;                continue;            }            if (i - pred > 0) {                javaScriptWriter.write(',');            }            for (; pred > 0; pred--) {                javaScriptWriter.writeNull().write(',');            }            javaScriptWriter.write(url);        }        javaScriptWriter.writeln(");");    }