Examples of LayoutDefinitionException


Examples of com.sun.jsftemplating.layout.LayoutDefinitionException

      builder.setErrorHandler(new ParsingErrorHandler());
      is = this.url.openStream();
      bs = new BufferedInputStream(is);
      document = builder.parse(new IncludeInputStream(bs));
  } catch (Exception e) {
      throw new LayoutDefinitionException(e);
  } finally {
      Util.closeStream(bs);
      Util.closeStream(is);
  }
    }
View Full Code Here

Examples of com.sun.jsftemplating.layout.LayoutDefinitionException

  // Make sure we found the url
  URL url = null;
  try {
      url = FileUtil.searchForFile(key, defaultSuffix);
  } catch (IOException ex) {
      throw new LayoutDefinitionException(
        "Unable to locate '" + key + "'", ex);
  }
  if (url == null) {
      throw new LayoutDefinitionException(
        "Unable to locate '" + key + "'");
  }

  // Read the template file
  LayoutDefinition ld = null;
  try {
      ld  = new FaceletsLayoutDefinitionReader(key, url).read();
  } catch (IOException ex) {
      throw new LayoutDefinitionException(
    "Unable to process '" + url.toString() + "'.", ex);
  }

        // Dispatch "initPage" handlers
        ld.dispatchInitPageHandlers(FacesContext.getCurrentInstance(), ld);
View Full Code Here

Examples of com.sun.jsftemplating.layout.LayoutDefinitionException

  // Make sure we found the url
  URL url = null;
  try {
      url = FileUtil.searchForFile(key, ".jsf");
  } catch (IOException ex) {
      throw new LayoutDefinitionException(
        "Unable to locate '" + key + "'", ex);
  }
  if (url == null) {
      throw new LayoutDefinitionException(
        "Unable to locate '" + key + "'");
  }

  // Read the template file
  LayoutDefinition ld = null;
  try {
      ld  = new TemplateReader(key, url).read();
  } catch (IOException ex) {
      throw new LayoutDefinitionException(
    "Unable to process '" + url.toString() + "'.", ex);
  }

  // Dispatch "initPage" handlers
  ld.dispatchInitPageHandlers(FacesContext.getCurrentInstance(), ld);
View Full Code Here

Examples of com.sun.jsftemplating.layout.LayoutDefinitionException

  // Make sure we found the url
  URL url = null;
  try {
      url = FileUtil.searchForFile(key, ".jsf");
  } catch (IOException ex) {
      throw new LayoutDefinitionException(
        "Unable to locate '" + key + "'", ex);
  }
  if (url == null) {
      throw new LayoutDefinitionException(
        "Unable to locate '" + key + "'");
  }

  // Read the XML file
  LayoutDefinition ld = null;
  String baseURI = getBaseURI();
  try {
      ld  = new XMLLayoutDefinitionReader(url, getEntityResolver(),
    getErrorHandler(), baseURI).read();
  } catch (IOException ex) {
      throw new LayoutDefinitionException("Unable to process '"
        + url + "'.  EntityResolver: '" + getEntityResolver()
        + "'.  ErrorHandler: '" + getErrorHandler()
        + "'.  baseURI: '" + baseURI + "'.", ex);
  }
View Full Code Here

Examples of com.sun.jsftemplating.layout.LayoutDefinitionException

  Method method = null;
  try {
      method = ctx.getClass().getMethod(
        "getResource", GET_RES_ARGS);
  } catch (NoSuchMethodException ex) {
      throw new LayoutDefinitionException("Unable to find "
    + "'getResource' method in this environment!", ex);
  }
  try {
      url = (URL) method.invoke(ctx, new Object [] {"/" + relPath});
  } catch (IllegalAccessException ex) {
      throw new LayoutDefinitionException(ex);
  } catch (InvocationTargetException ex) {
      throw new LayoutDefinitionException(ex);
  }

  return url;
    }
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.