Examples of FaceletHandler


Examples of com.sun.facelets.FaceletHandler

            log.fine("Creating Facelet for: " + url);
        }
        String alias = "/"
                + url.getFile().replaceFirst(this.baseUrl.getFile(), "");
        try {
            FaceletHandler h = this.compiler.compile(url, alias);
            DefaultFacelet f = new DefaultFacelet(this, this.compiler
                    .createExpressionFactory(), url, alias, h);
            return f;
        } catch (FileNotFoundException fnfe) {
            if (log.isLoggable(Level.WARNING)) {
View Full Code Here

Examples of com.sun.facelets.FaceletHandler

    public NamespaceUnit(TagLibrary library) {
        this.library = library;
    }

    public FaceletHandler createFaceletHandler() {
        FaceletHandler next = this.getNextFaceletHandler();
        return new NamespaceHandler(next, this.library, this.ns);
    }
View Full Code Here

Examples of com.sun.facelets.FaceletHandler

      log.fine("Creating Facelet for: " + url);
    }
    String alias = "/"
        + url.getFile().replaceFirst(this.baseUrl.getFile(), "");
    try {
      FaceletHandler h = this.compiler.compile(url, alias);
      DefaultFacelet f = new DefaultFacelet(this, this.compiler
          .createExpressionFactory(), url, alias, h);
      return f;
    } catch (FileNotFoundException fnfe) {
      if (log.isLoggable(Level.WARNING)) {
View Full Code Here

Examples of javax.faces.view.facelets.FaceletHandler

        }

        String alias = "/" + url.getFile().replaceFirst(_baseUrl.getFile(), "");
        try
        {
            FaceletHandler h = _compiler.compile(url, alias);
            DefaultFacelet f = new DefaultFacelet(this, _compiler.createExpressionFactory(), url, alias, h);
            return f;
        }
        catch (FileNotFoundException fnfe)
        {
View Full Code Here

Examples of javax.faces.view.facelets.FaceletHandler

        // The alias is used later for informative purposes, so we append
        // some prefix to identify later where the errors comes from.
        String alias = "/viewMetadata/" + url.getFile().replaceFirst(_baseUrl.getFile(), "");
        try
        {
            FaceletHandler h = _compiler.compileViewMetadata(url, alias);
            DefaultFacelet f = new DefaultFacelet(this, _compiler.createExpressionFactory(), url, alias, h);
            return f;
        }
        catch (FileNotFoundException fnfe)
        {
View Full Code Here

Examples of javax.faces.view.facelets.FaceletHandler

        }

        String alias = "/" + _removeFirst(url.getFile(), _baseUrl.getFile());
        try
        {
            FaceletHandler h = _compiler.compile(url, alias);
            DefaultFacelet f = new DefaultFacelet(this, _compiler.createExpressionFactory(), url, alias, h);
            return f;
        }
        catch (FileNotFoundException fnfe)
        {
View Full Code Here

Examples of javax.faces.view.facelets.FaceletHandler

        // The alias is used later for informative purposes, so we append
        // some prefix to identify later where the errors comes from.
        String alias = "/viewMetadata/" + _removeFirst(url.getFile(), _baseUrl.getFile());
        try
        {
            FaceletHandler h = _compiler.compileViewMetadata(url, alias);
            DefaultFacelet f = new DefaultFacelet(this, _compiler.createExpressionFactory(), url, alias, h);
            return f;
        }
        catch (FileNotFoundException fnfe)
        {
View Full Code Here

Examples of javax.faces.view.facelets.FaceletHandler

        // The alias is used later for informative purposes, so we append
        // some prefix to identify later where the errors comes from.
        String alias = "/compositeComponentMetadata/" + _removeFirst(url.getFile(), _baseUrl.getFile());
        try
        {
            FaceletHandler h = _compiler.compileCompositeComponentMetadata(url, alias);
            DefaultFacelet f = new DefaultFacelet(this, _compiler.createExpressionFactory(), url, alias, h, true);
            return f;
        }
        catch (FileNotFoundException fnfe)
        {
View Full Code Here

Examples of javax.faces.view.facelets.FaceletHandler

                return true;
            }

            initFacetHandlersMap(ctx);

            FaceletHandler handler = _facetHandlersMap.get(name);

            if (handler != null)
            {
                AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
                // Pop the current composite component on stack, so #{cc} references
                // can be resolved correctly, because they are relative to the page
                // that define it.
                FaceletCompositionContext fcc = actx.getFaceletCompositionContext();
                UIComponent innerCompositeComponent = fcc.getCompositeComponentFromStack();
                fcc.popCompositeComponentToStack();
                // Pop the template context, so ui:xx tags and nested composite component
                // cases could work correctly
                TemplateContext itc = actx.popTemplateContext();
                try
                {
                    handler.apply(ctx, parent);
                }
                finally
                {
                    actx.pushTemplateContext(itc);
                    fcc.pushCompositeComponentToStack(innerCompositeComponent);
                }
                return true;
               
            }
            else
            {
                checkFacetRequired(ctx, parent, name);
                return true;
            }
        }
        else
        {
            AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
            // Pop the current composite component on stack, so #{cc} references
            // can be resolved correctly, because they are relative to the page
            // that define it.
            FaceletCompositionContext fcc = actx.getFaceletCompositionContext();
            UIComponent innerCompositeComponent = fcc.getCompositeComponentFromStack();
            fcc.popCompositeComponentToStack();
            // Pop the template context, so ui:xx tags and nested composite component
            // cases could work correctly
            TemplateContext itc = actx.popTemplateContext();
            try
            {
                for (FaceletHandler handler : _componentHandlers)
                {
                    handler.apply(ctx, parent);
                }
            }
            finally
            {
                actx.pushTemplateContext(itc);
View Full Code Here

Examples of javax.faces.view.facelets.FaceletHandler

  }

  public void onComponentCreated(FaceletContext context, UIComponent component, UIComponent parent) {

    StringBuilder content = new StringBuilder();
    final FaceletHandler next = getComponentConfig().getNextHandler();
    if (next instanceof TextHandler) {
      content.append(((TextHandler) next).getText(context));
    } else {
      // TBD: is this okay, or is here something to do?
      // on the other side, Script inside the page is deprecated.
      LOG.warn("Not applied for handler: " + next.getClass().getName());
    }

    ((UIStyle) component).setStyle(content.toString());
  }
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.