@Override public ExternalContext getExternalContext(Object context, Object request, Object response) throws FacesException { ExternalContext externalContext = factory.getExternalContext(context, request, response); return wrap(externalContext); }
@Override public ExternalContext getExternalContext(final Object context, final Object request, final Object response) { ExternalContext ec = original.getExternalContext(context, request, response); return new RedirectExternalContext(ec); }
/** * Returns a new instance of {@link OmniExternalContext} which wraps the original external context. */ @Override public ExternalContext getExternalContext(Object context, Object request, Object response) { return new OmniExternalContext(getWrapped().getExternalContext(context, request, response)); }
/** * Returns a new instance of {@link OmniExternalContext} which wraps the original external context. */ @Override public ExternalContext getExternalContext(Object context, Object request, Object response) { return new OmniExternalContext(getWrapped().getExternalContext(context, request, response)); }
@Override public ExternalContext getExternalContext(final Object context, final Object request, final Object response) throws FacesException { try { BeanManager manager = BeanManagerAccessor.getManager(); SeamExternalContext seamExternalContext = BeanManagerUtils.getContextualInstance(manager, SeamExternalContext.class); seamExternalContext.setWrapped(parent.getExternalContext(context, request, response)); return seamExternalContext; } catch (Exception e) { throw new IllegalStateException("Could not wrap ExternalContext", e); } }
public FacesContext getFacesContext(Object sc, Object request, Object response, Lifecycle lifecycle) throws FacesException { FacesContext ctx = new FacesContextImpl( externalContextFactory.getExternalContext(sc, request, response), lifecycle); ctx.setExceptionHandler(exceptionHandlerFactory.getExceptionHandler()); return ctx; }
public FacesContext getFacesContext(Object sc, Object request, Object response, Lifecycle lifecycle) throws FacesException { FacesContext ctx = new FacesContextImpl( externalContextFactory.getExternalContext(sc, request, response), lifecycle); ctx.setExceptionHandler(exceptionHandlerFactory.getExceptionHandler()); return ctx; }
@Override public ExternalContext getExternalContext(final Object context, final Object request, final Object response) throws FacesException { try { BeanManager manager = new BeanManagerLocator().getBeanManager(); SeamExternalContext seamExternalContext = BeanManagerUtils .getContextualInstance(manager, SeamExternalContext.class); seamExternalContext.setWrapped(parent.getExternalContext(context, request, response)); return seamExternalContext; } catch (Exception e) { throw new IllegalStateException("Could not wrap ExternalContext", e); } }
@Override public ExternalContext getExternalContext(Object context, Object request, Object response) throws FacesException { // If the specified objects are coming from a portlet container, then return an instance of the // bridge's ExternalContext implementation. // // NOTE: Can't use BridgeUtil.isPortletRequest() here because the FacesContext is in the process of // initialization. if (context instanceof PortletContext) { ExternalContext externalContext = new ExternalContextImpl((PortletContext) context, (PortletRequest) request, (PortletResponse) response); String resourceName = externalContext.getRequestParameterMap().get("javax.faces.resource"); // Workaround for FACES-2133 if ("org.richfaces.resource.MediaOutputResource".equals(resourceName)) { return new ExternalContextRichFacesBridgeImpl(externalContext); } else { return externalContext; } } // Otherwise, it is possible that a request hit the FacesServlet directly, and we should delegate // to the chain. Such requests can happen when JSF UI components are not properly calling // @link {ViewHandler.getResourceURL(FacesContext, String)} to get properly encoded resource URLs that // invoke the Portlet 2.0 RESOURCE_PHASE. In such a case, we just delegate to the Mojarra or MyFaces // wrapped ExternalContextFactory implementation to get an ExternalContext. else { logger.debug("Received a non-portlet request; delegating to wrapped ExternalContextFactory"); return wrappedFactory.getExternalContext(context, request, response); } }
@Override public ExternalContext getExternalContext(Object context, Object request, Object response) throws FacesException { // If the specified objects are coming from a portlet container, then return an instance of the // bridge's ExternalContext implementation. // // NOTE: Can't use BridgeUtil.isPortletRequest() here because the FacesContext is in the process of // initialization. if (context instanceof PortletContext) { ExternalContext externalContext = new ExternalContextImpl((PortletContext) context, (PortletRequest) request, (PortletResponse) response); String resourceName = externalContext.getRequestParameterMap().get("javax.faces.resource"); // Workaround for FACES-2133 if ("org.richfaces.resource.MediaOutputResource".equals(resourceName)) { return new ExternalContextRichFacesBridgeImpl(externalContext); } else { return externalContext; } } // Otherwise, it is possible that a request hit the FacesServlet directly, and we should delegate // to the chain. Such requests can happen when JSF UI components are not properly calling // @link {ViewHandler.getResourceURL(FacesContext, String)} to get properly encoded resource URLs that // invoke the Portlet 2.0 RESOURCE_PHASE. In such a case, we just delegate to the Mojarra or MyFaces // wrapped ExternalContextFactory implementation to get an ExternalContext. else { logger.debug("Received a non-portlet request; delegating to wrapped ExternalContextFactory"); return wrappedFactory.getExternalContext(context, request, response); } }
ExternalContext externalContext = _externalContextFactory.getExternalContext(context, request, response);
ExternalContext externalContext = _externalContextFactory.getExternalContext(context, request, response);
ExternalContext externalContext = _externalContextFactory.getExternalContext(context, request, response);
@Override public FacesContext getFacesContext(Object sc, Object request, Object response, Lifecycle lifecycle) throws FacesException { Util.notNull("sc", sc); Util.notNull("request", request); Util.notNull("response", response); Util.notNull("lifecycle", lifecycle); ExternalContext extContext; FacesContext ctx = new FacesContextImpl( extContext = externalContextFactory.getExternalContext(sc, request, response), lifecycle); ctx.setExceptionHandler(exceptionHandlerFactory.getExceptionHandler()); WebConfiguration webConfig = WebConfiguration.getInstance(extContext); savePerRequestInitParams(ctx, webConfig); return ctx; }
@Override public FacesContext getFacesContext(Object sc, Object request, Object response, Lifecycle lifecycle) throws FacesException { Util.notNull("sc", sc); Util.notNull("request", request); Util.notNull("response", response); Util.notNull("lifecycle", lifecycle); ExternalContext extContext; FacesContext ctx = new FacesContextImpl( extContext = externalContextFactory.getExternalContext(sc, request, response), lifecycle); ctx.setExceptionHandler(exceptionHandlerFactory.getExceptionHandler()); WebConfiguration webConfig = WebConfiguration.getInstance(extContext); savePerRequestInitParams(ctx, webConfig); return ctx; }
@Override public FacesContext getFacesContext(Object sc, Object request, Object response, Lifecycle lifecycle) throws FacesException { Util.notNull("sc", sc); Util.notNull("request", request); Util.notNull("response", response); Util.notNull("lifecycle", lifecycle); ExternalContext extContext; FacesContext ctx = new FacesContextImpl( extContext = externalContextFactory.getExternalContext(sc, request, response), lifecycle); ctx.setExceptionHandler(exceptionHandlerFactory.getExceptionHandler()); WebConfiguration webConfig = WebConfiguration.getInstance(extContext); savePerRequestInitParams(ctx, webConfig); return ctx; }
@Override public FacesContext getFacesContext(Object sc, Object request, Object response, Lifecycle lifecycle) throws FacesException { Util.notNull("sc", sc); Util.notNull("request", request); Util.notNull("response", response); Util.notNull("lifecycle", lifecycle); ExternalContext extContext; FacesContext ctx = new FacesContextImpl( extContext = externalContextFactory.getExternalContext(sc, request, response), lifecycle); ctx.setExceptionHandler(exceptionHandlerFactory.getExceptionHandler()); WebConfiguration webConfig = WebConfiguration.getInstance(extContext); savePerRequestInitParams(ctx, webConfig); return ctx; }