Ejemplo n.º 1
0
        protected override FacesContext getFacesContext()
        {
            Control nc = NamingContainer;

            if (nc != null)
            {
                return(nc.getFacesContext());
            }
            return(FacesContext.getCurrentInstance());
        }
Ejemplo n.º 2
0
        public static ServletFacesContext GetFacesContext(FacesContextFactory facesContextFactory,
                                                          ServletContext servletContext,
                                                          ServletRequest servletRequest,
                                                          ServletResponse servletResponse,
                                                          Lifecycle lifecycle,
                                                          HttpContext httpContext,
                                                          string executionFilePath)
        {
            FacesContext        oldFacesContex     = FacesContext.getCurrentInstance();
            FacesContext        wrappedFacesContex = facesContextFactory.getFacesContext(servletContext, servletRequest, servletResponse, lifecycle);
            ExternalContext     externalContext    = new ServletExternalContext(wrappedFacesContex.getExternalContext(), httpContext, executionFilePath);
            ServletFacesContext context            = new ServletFacesContext(wrappedFacesContex, externalContext, httpContext, oldFacesContex);

            return(context);
        }
Ejemplo n.º 3
0
 protected override FacesContext getFacesContext()
 {
     return(_facesContext ?? (_facesContext = FacesContext.getCurrentInstance()));
 }