jsWriter.writeln("}");
    private void sendCancel(FacesContext facesContext, String componentId,            int rowIndex) {        ServletResponse response = (ServletResponse) facesContext                .getExternalContext().getResponse();        setNoCache(response);        response.setContentType(IHtmlRenderContext.JAVASCRIPT_TYPE                + "; charset=" + RESPONSE_CHARSET);        try {            PrintWriter printWriter = response.getWriter();            IJavaScriptWriter jsWriter = new JavaScriptResponseWriter(                    facesContext, printWriter, null, null);            String varId = jsWriter.getComponentVarName();            jsWriter.write("var ").write(varId).write('=').writeCall("f_core",                    "GetElementById").writeString(componentId).writeln(                    ", document);");            jsWriter.write("with (").write(varId).writeln(") {");            jsWriter.writeCall(null, "_cancelServerRequest").writeInt(rowIndex)                    .write(");");            jsWriter.writeln("}");        } catch (IOException ex) {            throw new FacesException("Can not write cancel response.", ex);        }        facesContext.responseComplete();    }