Package javax.faces.render

Examples of javax.faces.render.RenderKit.createResponseWriter()


        // get the encoding
        String encoding = (String) context.getAttributes().get("facelets.Encoding");

        // -= Leonardo Uribe =- Add */* to the contentType is a fix done from FaceletViewHandler
        // to make old RI versions work, but since this is for JSF 2.0 it is not necessary that code.
        ResponseWriter writer = renderKit.createResponseWriter(FaceletsVDLUtils.NullWriter.INSTANCE,
            contentType, encoding);

        //ResponseWriter writer;
        // append */* to the contentType so createResponseWriter will succeed no matter
        // the requested contentType.
View Full Code Here


    {
      newWriter = oldWriter.cloneWithWriter(strWriter);
    }
    else
    {
      newWriter = renderKit.createResponseWriter(strWriter, null,
                                                 renderResponse.getCharacterEncoding());
    }
    context.setResponseWriter(newWriter);

    newWriter.startDocument();
View Full Code Here

        FastStringWriter content = new FastStringWriter(1024 * 10);
        RenderKitFactory renderFactory = (RenderKitFactory)
            FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
        RenderKit renderKit = renderFactory.getRenderKit(
            facesContext, viewRoot.getRenderKitId());
        ResponseWriter contentWriter = renderKit.createResponseWriter(content, null, null);
        facesContext.setResponseWriter(contentWriter);

        AjaxUtils.processAjax(facesContext, viewRoot);

        FastStringWriter jsfState = new FastStringWriter();
View Full Code Here

            RenderKitFactory renderFactory = (RenderKitFactory)FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
            RenderKit renderKit = renderFactory.getRenderKit(facesContext,
                                                             facesContext.getViewRoot().getRenderKitId());

            if (isPartialStateSavingOn(facesContext)) {
                    _writer = renderKit.createResponseWriter(new _DummyPageContextOutWriter(pageContext),
                                                             null /*Default: get the allowed content-types from the accept-header*/,
                                                             pageContext.getRequest().getCharacterEncoding());
            } else {
                    _writer = renderKit.createResponseWriter(new _PageContextOutWriter(pageContext),
                                                             null /*Default: get the allowed content-types from the accept-header*/,
 
View Full Code Here

            if (isPartialStateSavingOn(facesContext)) {
                    _writer = renderKit.createResponseWriter(new _DummyPageContextOutWriter(pageContext),
                                                             null /*Default: get the allowed content-types from the accept-header*/,
                                                             pageContext.getRequest().getCharacterEncoding());
            } else {
                    _writer = renderKit.createResponseWriter(new _PageContextOutWriter(pageContext),
                                                             null /*Default: get the allowed content-types from the accept-header*/,
                                                             pageContext.getRequest().getCharacterEncoding());

            }
            facesContext.setResponseWriter(_writer);
View Full Code Here

    {
      ResponseWriter responseWriter = null;
      RenderKit kit = _context.getRenderKit();
      if (kit != null)
      {
        responseWriter = kit.createResponseWriter(out, "text/xml", encoding);
      }
      else
      {
        responseWriter = new XmlResponseWriter(out, encoding);
      }
View Full Code Here

    String contentTypeList,
    String encoding)
  {
    RenderKit renderKit = getRenderKit();
    ResponseWriter out =
      renderKit.createResponseWriter(writer, contentTypeList, encoding);

    return createDecoratedResponseWriter(out);
  }

  @Override
View Full Code Here

        Application application = facesContext.getApplication();
        ViewHandler applicationViewHandler = application.getViewHandler();
        String renderKitId = applicationViewHandler.calculateRenderKitId(facesContext);
        renderKit = renderFactory.getRenderKit(facesContext, renderKitId);
      }
      writer = renderKit.createResponseWriter(((HttpServletResponse)
              facesContext.getExternalContext().getResponse()).getWriter(), null, null);
    }
    ResponseUtils.ensureNoCacheHeader(facesContext);
    writer.startElement("redirect", null);
    writer.writeAttribute("url", url, null);
View Full Code Here

        Application application = facesContext.getApplication();
        ViewHandler applicationViewHandler = application.getViewHandler();
        String renderKitId = applicationViewHandler.calculateRenderKitId(facesContext);
        renderKit = renderFactory.getRenderKit(facesContext, renderKitId);
      }
      writer = renderKit.createResponseWriter(((HttpServletResponse)
              facesContext.getExternalContext().getResponse()).getWriter(), null, null);
    }
    ResponseUtils.ensureNoCacheHeader(facesContext);
    writer.startElement("redirect", null);
    writer.writeAttribute("url", url, null);
View Full Code Here

        BufferedStringWriter strWriter = new BufferedStringWriter(facesContext, bufSize);
        ResponseWriter newWriter;
        if (null != oldWriter) {
            newWriter = oldWriter.cloneWithWriter(strWriter);
        } else {
            newWriter = renderKit.createResponseWriter(strWriter, null,
                    request.getCharacterEncoding());
        }
        facesContext.setResponseWriter(newWriter);

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.