Package javax.faces.view.facelets

Examples of javax.faces.view.facelets.FaceletHandler


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


        // 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,
                    alias, h, true);
            return f;
        }
        catch (FileNotFoundException fnfe)
View Full Code Here

  public ScriptHandler(final ComponentConfig config) {
    super(config);
  }

  public void onComponentCreated(final FaceletContext context, final UIComponent component, final UIComponent parent) {
    final FaceletHandler next = getComponentConfig().getNextHandler();
    if (next instanceof TextHandler) {
      final String script = ((TextHandler) next).getText(context);
      if (StringUtils.isNotBlank(script)) {
        ((UIScript) component).setScript(script);
      }
View Full Code Here

    super(config);
  }

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

    final FaceletHandler next = getComponentConfig().getNextHandler();
    if (next instanceof TextHandler) {
      final String style = ((TextHandler) next).getText(context);
      if (StringUtils.isNotBlank(style)) {
        ((UIStyle) component).setStyle(style);
      }
View Full Code Here

    } finally {
      if (is != null) {
        is.close();
      }
    }
    FaceletHandler result = new EncodingHandler(createFaceletHandler(mngr), encoding,
      getCompilationMessageHolder(mngr));
    setCompilationMessageHolder(mngr, null);
    // does not allow us to access at JBoss
    // FaceletHandler result = new EncodingHandler(mngr.createFaceletHandler(), encoding, mngr.getCompilationMessageHolder());
    // mngr.setCompilationMessageHolder(null);
View Full Code Here

  private Facelet createFacelet(InputStream is, URL url) throws IOException, FacesException, ELException {
    LOGGER.trace("Creating Facelet for: '{}'.", url);
    String alias = "/" + url.getFile().replaceFirst(this.baseUrl.getFile(), "");

    try {
      FaceletHandler h = ((LiteCompiler) this.compiler).compile(is, url, alias);
      return createDefaultFacelet(url, alias, h);
      //return new DefaultFacelet(this, this.compiler.createExpressionFactory(), url, alias, h);
    } catch (FileNotFoundException fnfe) {
      LOGGER.warn("{} not found at {}", alias, url.toExternalForm());
      throw new FileNotFoundException("Facelet Not Found: ");
View Full Code Here

  private Facelet createFacelet(InputStream is, String alias) throws IOException, FacesException, ELException {
    LOGGER.trace("Creating Facelet for: {}", alias);
    URL url = resolveURL("/");

    try {
      FaceletHandler h = ((LiteCompiler) this.compiler).compile(is, url, alias);

      return createDefaultFacelet(url, alias, h);
      //return new DefaultFacelet(this, this.compiler.createExpressionFactory(), url, alias, h);
    } catch (FileNotFoundException fnfe) {
      throw new FileNotFoundException("Facelet Not Found: " + alias);
View Full Code Here

            log.fine("Creating Facelet for: " + url);
        }
        String escapedBaseURL = Pattern.quote(this.baseUrl.getFile());
        String alias = '/' + url.getFile().replaceFirst(escapedBaseURL, "");
        try {
            FaceletHandler h = this.compiler.compile(url, alias);
            return new DefaultFacelet(this,
                                      this.compiler.createExpressionFactory(),
                                      url,
                                      alias,
                                      h);
View Full Code Here

            log.fine("Creating Metadata Facelet for: " + url);
        }
        String escapedBaseURL = Pattern.quote(this.baseUrl.getFile());
        String alias = '/' + url.getFile().replaceFirst(escapedBaseURL, "");
        try {
            FaceletHandler h = this.compiler.metadataCompile(url, alias);
            return new DefaultFacelet(this,
                                      this.compiler.createExpressionFactory(),
                                      url,
                                      alias,
                                      h);
View Full Code Here

            log.fine("Creating Facelet for: " + url);
        }
        String escapedBaseURL = Pattern.quote(this.baseUrl.getFile());
        String alias = '/' + url.getFile().replaceFirst(escapedBaseURL, "");
        try {
            FaceletHandler h = this.compiler.compile(url, alias);
            return new DefaultFacelet(this,
                                      this.compiler.createExpressionFactory(),
                                      url,
                                      alias,
                                      h);
View Full Code Here

TOP

Related Classes of javax.faces.view.facelets.FaceletHandler

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.