Package com.sun.facelets.compiler

Examples of com.sun.facelets.compiler.SAXCompiler


   private Compiler compiler;
  
   @Create
   public void create()
   {
      compiler = new SAXCompiler();
   }
View Full Code Here


                this.servletRequest, this.servletResponse,
                this.factoryLifecycle
                        .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"));
View Full Code Here

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

    protected Compiler createCompiler() {
        return new SAXCompiler();
    }
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

   private Compiler compiler;
  
   @Create
   public void create()
   {
      compiler = new SAXCompiler();
     // fill the necessary parameters
      initializeCompiler(compiler);
   }
View Full Code Here

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

    protected Compiler createCompiler() {
        return new SAXCompiler();
    }
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

    super(name);
  }
 
  public void setUp() throws Exception {
    super.setUp();
    Compiler c = new SAXCompiler();
    //c.setTrimmingWhitespace(true);
    FaceletFactory factory = new DefaultFaceletFactory(c, this);
    FaceletFactory.setInstance(factory);

    facesContext.setViewRoot(facesContext.getApplication().getViewHandler().createView(facesContext, "/test"));
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 root = facesContext.getViewRoot();
            f.apply(facesContext, root);
            HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
            response.setCharacterEncoding("UTF-8");
            response.setContentType("text/html; UTF-8");
View Full Code Here

TOP

Related Classes of com.sun.facelets.compiler.SAXCompiler

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.