ParametredHttpServlet
ConfiguredHttpServlet
    public void service(FacesContext facesContext, String commandId) {        Map parameters = facesContext.getExternalContext()                .getRequestParameterMap();        UIViewRoot viewRoot = facesContext.getViewRoot();        String index_s = (String) parameters.get("index");        if (index_s == null) {            sendJsError(facesContext, "Can not find 'index' parameter.");            return;        }        String dataGridId = (String) parameters.get("dataListId");        if (dataGridId == null) {            sendJsError(facesContext, "Can not find 'dataListId' parameter.");            return;        }        String filterExpression = (String) parameters.get("filterExpression");        int rowIndex = Integer.parseInt(index_s);        UIComponent component = ComponentTools.getForComponent(facesContext,                dataGridId, viewRoot);        if (component == null) {            // Cas special: la session a du expir�e ....            sendCancel(facesContext, dataGridId, rowIndex);            return;        }        if ((component instanceof DataListComponent) == false) {            sendJsError(facesContext, "Can not find dataListComponent (id='"                    + dataGridId + "').");            return;        }        DataListComponent dgc = (DataListComponent) component;        ISortedComponent sortedComponents[] = null;        /*         * String sortIndex_s = (String) parameters.get("sortIndex"); if         * (sortIndex_s != null) { DataColumnComponent columns[] =         * dgc.listColumns().toArray();         *          * String sortOrder_s = (String) parameters.get("sortOrder");         *          * StringTokenizer st1 = new StringTokenizer(sortIndex_s, ",");         * StringTokenizer st2 = null; if (sortOrder_s != null) { st2 = new         * StringTokenizer(sortOrder_s, ","); }         *          * sortedComponents = new ISortedComponent[st1.countTokens()];         *          * for (int i = 0; st1.hasMoreTokens(); i++) { String tok1 =         * st1.nextToken(); String tok2 = null; if (st2 != null) { tok2 =         * st2.nextToken(); }         *          * int idx = Integer.parseInt(tok1); boolean order =         * "true".equalsIgnoreCase(tok2);         *          * sortedComponents[i] = new DefaultSortedComponent(columns[idx], idx,         * order); } }         */        DataListRenderer dgr = getDataListRenderer(facesContext, dgc);        if (dgr == null) {            sendJsError(facesContext,                    "Can not find dataListRenderer. (dataListId='" + dataGridId                            + "')");            return;        }        ServletResponse response = (ServletResponse) facesContext                .getExternalContext().getResponse();        setNoCache(response);        response.setContentType(IHtmlRenderContext.JAVASCRIPT_TYPE                + "; charset=" + RESPONSE_CHARSET);        boolean useGzip = canUseGzip(facesContext);        PrintWriter printWriter = null;        try {            if (useGzip == false) {                printWriter = response.getWriter();            } else {                ParametredHttpServlet                        .setGzipContentEncoding((HttpServletResponse) response);                OutputStream outputStream = response.getOutputStream();                GZIPOutputStream gzipOutputStream = new GZIPOutputStream(                        outputStream, DEFAULT_BUFFER_SIZE);                Writer writer = new OutputStreamWriter(gzipOutputStream,                        RESPONSE_CHARSET);                printWriter = new PrintWriter(writer, false);            }            writeJs(facesContext, printWriter, dgc, dataGridId, dgr, rowIndex,                    sortedComponents, filterExpression);        } catch (IOException ex) {            throw new FacesException(                    "Can not write dataGrid javascript rows !", ex);        } finally {            if (printWriter != null) {                printWriter.close();            }        }        facesContext.responseComplete();    }