Examples of PreparerException


Examples of org.apache.tiles.preparer.PreparerException

        preparer = (ViewPreparer) this.sharedPreparers.get(name);
        if (preparer == null) {
          try {
            Class beanClass = context.getClassLoader().loadClass(name);
            if (!ViewPreparer.class.isAssignableFrom(beanClass)) {
              throw new PreparerException(
                  "Invalid preparer class [" + name + "]: does not implement ViewPreparer interface");
            }
            preparer = (ViewPreparer) context.getAutowireCapableBeanFactory().createBean(beanClass);
            this.sharedPreparers.put(name, preparer);
          }
View Full Code Here

Examples of org.apache.tiles.preparer.PreparerException

        preparer = this.sharedPreparers.get(name);
        if (preparer == null) {
          try {
            Class<?> beanClass = context.getClassLoader().loadClass(name);
            if (!ViewPreparer.class.isAssignableFrom(beanClass)) {
              throw new PreparerException(
                  "Invalid preparer class [" + name + "]: does not implement ViewPreparer interface");
            }
            preparer = (ViewPreparer) context.getAutowireCapableBeanFactory().createBean(beanClass);
            this.sharedPreparers.put(name, preparer);
          }
View Full Code Here

Examples of org.apache.tiles.preparer.PreparerException

        preparer = this.sharedPreparers.get(name);
        if (preparer == null) {
          try {
            Class<?> beanClass = context.getClassLoader().loadClass(name);
            if (!ViewPreparer.class.isAssignableFrom(beanClass)) {
              throw new PreparerException(
                  "Invalid preparer class [" + name + "]: does not implement ViewPreparer interface");
            }
            preparer = (ViewPreparer) context.getAutowireCapableBeanFactory().createBean(beanClass);
            this.sharedPreparers.put(name, preparer);
          }
View Full Code Here

Examples of org.apache.tiles.preparer.PreparerException

        // TODO: Temporary while preparerInstance gets refactored to throw a more specific exception.
        try {
            preparer.execute(context, componentContext);
        } catch (Exception e) {
            throw new PreparerException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.apache.tiles.preparer.PreparerException

            HttpServletResponse response = servletTilesContext.getResponse();
            ServletContext servletContext = (ServletContext) servletTilesContext
                    .getContext();
            RequestDispatcher rd = servletContext.getRequestDispatcher(url);
            if (rd == null) {
                throw new PreparerException(
                    "Controller can't find url '" + url + "'.");
            }

            try {
                rd.include(request, response);
            } catch (ServletException e) {
                throw new PreparerException(
                        "The request dispatcher threw an exception", e);
            } catch (IOException e) {
                throw new PreparerException(
                        "The request dispatcher threw an I/O exception", e);
            }
        } else {
            throw new PreparerException("Cannot dispatch url '" + url
                    + "' since this preparer has not been called under a servlet environment");
        }
    }
View Full Code Here

Examples of org.apache.tiles.preparer.PreparerException

            AttributeContext attributeContext) {

        try {
            tilesContext.include(url);
        } catch (IOException e) {
            throw new PreparerException("The inclusion of the URL " + url
                    + " threw an I/O exception", e);
        }
    }
View Full Code Here

Examples of org.apache.tiles.preparer.PreparerException

        if (tilesContext instanceof DispatchRequest) {
            try {
                ((DispatchRequest) tilesContext).include(url);
            } catch (IOException e) {
                throw new PreparerException("The inclusion of the URL " + url
                        + " threw an I/O exception", e);
            }
        } else {
            throw new PreparerException("This preparer is restricted to web environments");
        }
    }
View Full Code Here

Examples of org.apache.tiles.preparer.PreparerException

        preparer = this.sharedPreparers.get(name);
        if (preparer == null) {
          try {
            Class<?> beanClass = context.getClassLoader().loadClass(name);
            if (!ViewPreparer.class.isAssignableFrom(beanClass)) {
              throw new PreparerException(
                  "Invalid preparer class [" + name + "]: does not implement ViewPreparer interface");
            }
            preparer = (ViewPreparer) context.getAutowireCapableBeanFactory().createBean(beanClass);
            this.sharedPreparers.put(name, preparer);
          }
View Full Code Here

Examples of org.apache.tiles.preparer.PreparerException

        // TODO: Temporary while preparerInstance gets refactored to throw a more specific exception.
        try {
            preparer.execute(context, attributeContext);
        } catch (Exception e) {
            throw new PreparerException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.apache.tiles.preparer.PreparerException

        preparer = this.sharedPreparers.get(name);
        if (preparer == null) {
          try {
            Class<?> beanClass = context.getClassLoader().loadClass(name);
            if (!ViewPreparer.class.isAssignableFrom(beanClass)) {
              throw new PreparerException(
                  "Invalid preparer class [" + name + "]: does not implement ViewPreparer interface");
            }
            preparer = (ViewPreparer) context.getAutowireCapableBeanFactory().createBean(beanClass);
            this.sharedPreparers.put(name, preparer);
          }
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.