Package com.sun.facelets.impl

Examples of com.sun.facelets.impl.DefaultFaceletFactory


            }
        };
    }

    protected void buildView(String viewId) throws IOException {
        FaceletFactory factory = new DefaultFaceletFactory(compiler, createResourceResolver());

        FaceletFactory.setInstance(factory);

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet(viewId);
View Full Code Here


   /**
    * Get a Facelet for a URL
    */
   protected Facelet faceletForURL(URL url) throws IOException
   {
      return new DefaultFaceletFactory(FaceletCompiler.instance(), new DefaultResourceResolver())
               .getFacelet(url);
   }
View Full Code Here

                        .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE));
       
       
        Compiler c = new SAXCompiler();
        //c.setTrimmingWhitespace(true);
        FaceletFactory factory = new DefaultFaceletFactory(c, this);
        FaceletFactory.setInstance(factory);
       
        faces.setViewRoot(faces.getApplication().getViewHandler().createView(faces, "/test"));
       
        ResponseWriter rw = faces.getRenderKit().createResponseWriter(new StringWriter(), null, null);
View Full Code Here

                        + resolverName + "]", e);
            }
        }

        // Resource.getResourceUrl(ctx,"/")
        return new DefaultFaceletFactory(c, resolver, refreshPeriod);
    }
View Full Code Here

      {
         try
         {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            URL url = SeamDebugPhaseListener.class.getClassLoader().getResource("META-INF/debug.xhtml");
            Facelet f = new DefaultFaceletFactory( new SAXCompiler(), new DefaultResourceResolver() ).getFacelet(url);
            UIViewRoot viewRoot = facesContext.getViewRoot();
            f.apply(facesContext, viewRoot);
            HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
            response.setCharacterEncoding("UTF-8");
            response.setContentType("text/html; UTF-8");
View Full Code Here

      URL url = ResourceLoader.instance().getResource(viewId);
      if (url == null)
      {
         throw new IllegalArgumentException("resource doesn't exist: " + viewId);
      }
      return new DefaultFaceletFactory(FaceletCompiler.instance(), new DefaultResourceResolver())
               .getFacelet(url);
   }
View Full Code Here

      URL url = ResourceLoader.instance().getResource(viewId);
      if (url == null)
      {
         throw new IllegalArgumentException("resource doesn't exist: " + viewId);
      }
      return new DefaultFaceletFactory(FaceletCompiler.instance(), new DefaultResourceResolver())
               .getFacelet(url);
   }
View Full Code Here

                        + resolverName + "]", e);
            }
        }

        // Resource.getResourceUrl(ctx,"/")
        return new DefaultFaceletFactory(c, resolver, refreshPeriod);
    }
View Full Code Here

      if ( viewId!=null && viewId.startsWith("/debug.") && Init.instance().isDebug() )
      {
         try
         {
            URL url = SeamDebugPhaseListener.class.getClassLoader().getResource("META-INF/debug.xhtml");
            Facelet f = new DefaultFaceletFactory( new SAXCompiler(), new DefaultResourceResolver() ).getFacelet(url);
            UIViewRoot root = facesContext.getViewRoot();
            f.apply(facesContext, root);
            HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
            response.setContentType("text/html");
            ResponseWriter writer = facesContext.getRenderKit().createResponseWriter( response.getWriter(), "text/html", "UTF-8" );
View Full Code Here

   /**
    * Get a Facelet for a URL
    */
   protected Facelet faceletForURL(URL url) throws IOException
   {
      return new DefaultFaceletFactory(new SAXCompiler(), new DefaultResourceResolver())
               .getFacelet(url);
   }
View Full Code Here

TOP

Related Classes of com.sun.facelets.impl.DefaultFaceletFactory

Copyright © 2018 www.massapicom. 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.