Package javax.faces.context

Examples of javax.faces.context.ExternalContext.dispatch()


            response.setLocale(viewToRender.getLocale());
        }

        // TODO: 2.5.2.2 for Portlet?  What do I do?

        externalContext.dispatch(viewId);

        // handle character encoding as of section 2.5.2.2 of JSF 1.1
        if (externalContext.getRequest() instanceof HttpServletRequest) {
            HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
            HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
View Full Code Here


     
      // Bridge has had to set this attribute so  Faces RI will skip servlet dependent
      // code when mapping from request paths to viewIds -- however we need to remove it
      // as it screws up the dispatch
      extContext.getRequestMap().remove("javax.servlet.include.servlet_path");
      extContext.dispatch(viewToRender.getViewId());
      /*
       * if (executePageToBuildView(context, viewToRender)) { response.flushBuffer(); return; }
       */
    }
    catch (IOException e)
View Full Code Here

        ExternalContext externalContext = facesContext.getExternalContext();

        String viewId = facesContext.getViewRoot().getViewId();

        if (PortletUtil.isPortletRequest(facesContext)) {
            externalContext.dispatch(viewId);
            return;
        }
       
        ServletMapping servletMapping = getServletMapping(externalContext);
        if (servletMapping.isExtensionMapping())
View Full Code Here

            response.setLocale(viewToRender.getLocale());
        }
       
        // TODO: 2.5.2.2 for Portlet?  What do I do?

        externalContext.dispatch(viewId);

        // handle character encoding as of section 2.5.2.2 of JSF 1.1
        if (externalContext.getRequest() instanceof HttpServletRequest) {
            HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
            HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
View Full Code Here

        // replace the response with our wrapper
        InterweavingResponse wrapped = getWrapper(extContext);
        extContext.setResponse(wrapped);

        // build the view by executing the page
        extContext.dispatch(requestURI);
       
        if (logger.isLoggable(Level.FINE)) {
            logger.fine("After dispacthMessage to viewId " + requestURI);
        }
       
View Full Code Here

        ServletViewResponseWrapper wrappedResponse = new ServletViewResponseWrapper((HttpServletResponse) response);

        externalContext.setResponse(wrappedResponse);
        try
        {
            externalContext.dispatch(viewId);
        }
        catch (FacesException e)
        {
            // try to extract the most likely exceptions here
            // and provide a better error message for them
View Full Code Here

     
      // Bridge has had to set this attribute so  Faces RI will skip servlet dependent
      // code when mapping from request paths to viewIds -- however we need to remove it
      // as it screws up the dispatch
      extContext.getRequestMap().remove("javax.servlet.include.servlet_path");
      extContext.dispatch(viewToRender.getViewId());
      /*
       * if (executePageToBuildView(context, viewToRender)) { response.flushBuffer(); return; }
       */
    }
    catch (IOException e)
View Full Code Here

        // replace the response with our wrapper
        ViewHandlerResponseWrapper wrapped = getWrapper(extContext);
        extContext.setResponse(wrapped);

        // build the view by executing the page
        extContext.dispatch(requestURI);

        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("After dispacthMessage to viewId " + requestURI);
        }
View Full Code Here

      UIViewRoot viewToExecute) throws IOException {
    String requestURI = viewToExecute.getViewId();

    ExternalContext extContext = context.getExternalContext();

    extContext.dispatch(requestURI);
    return false;
  }

  @Override
  protected ViewHandler getWrapped() {
View Full Code Here

      UIViewRoot viewToExecute) throws IOException {
    String requestURI = viewToExecute.getViewId();

    ExternalContext extContext = context.getExternalContext();

    extContext.dispatch(requestURI);
    return false;
  }

  @Override
  protected ViewHandler getWrapped() {
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.