Package com.sun.facelets

Examples of com.sun.facelets.FaceletException


        String type = (String) this.features.get(name);
        if (type != null) {
            try {
                return ReflectionUtil.forName(type).newInstance();
            } catch (Throwable t) {
                throw new FaceletException("Could not instantiate feature["
                        + name + "]: " + type);
            }
        }
        return null;
    }
View Full Code Here


            encoding = writeXmlDecl(is, mngr);
            CompilationHandler handler = new CompilationHandler(mngr, alias);
            SAXParser parser = this.createSAXParser(handler);
            parser.parse(is, handler);
        } catch (SAXException e) {
            throw new FaceletException("Error Parsing " + alias + ": "
                    + e.getMessage(), e.getCause());
        } catch (ParserConfigurationException e) {
            throw new FaceletException("Error Configuring Parser " + alias
                    + ": " + e.getMessage(), e.getCause());
        } finally {
            if (is != null) {
                is.close();
            }
View Full Code Here

        URLConnection conn = url.openConnection();
        is = conn.getInputStream();
        long atl = conn.getLastModified();
        return atl == 0 || atl > ttl;
      } catch (Exception e) {
        throw new FaceletException("Error Checking Last Modified for "
            + facelet.getAlias(), e);
      } finally {
        if (is != null) {
          try {
            is.close();
View Full Code Here

                    TabChangeListener listener = (TabChangeListener) listenerRef;
                    ((HtmlPanelTabbedPane) parent).addTabChangeListener(listener);
                }
                else if (listenerRef == null)
                {
                    throw new FaceletException("Property 'type' must not be null.");
                }
                else
                {
                    throw new FaceletException(
                       "Property 'type' must be either a string (containing a class name) " +
                       "or a TabChangeListener instance.");
                }
            }
            else
            {
                throw new FaceletException(
                        "Component " + parent.getId() + " is not of type HtmlPanelTabbedPane");
            }
        }
    }
View Full Code Here

            this.converterId = converterId;
            this.type = type;
            try {
                this.constructor = this.type.getConstructor(CONS_SIG);
            } catch (Exception e) {
                throw new FaceletException(
                        "Must have a Constructor that takes in a ConverterConfig",
                        e);
            }
        }
View Full Code Here

                ConverterConfig ccfg = new ConverterConfigWrapper(cfg,
                        this.converterId);
                return (TagHandler) this.constructor
                        .newInstance(new Object[] { ccfg });
            } catch (InvocationTargetException e) {
                throw new FaceletException(e.getCause().getMessage(), e.getCause().getCause());
            } catch (Exception e) {
                throw new FaceletException("Error Instantiating ConverterHandler: "+this.type.getName(), e);
            }
        }
View Full Code Here

                try {
                    long atl = facelet.getSource().openConnection()
                            .getLastModified();
                    return atl > ttl;
                } catch (Exception e) {
                    throw new FaceletException(
                            "Error Checking Last Modified for "
                                    + facelet.getAlias(), e);
                }
            }
        }
View Full Code Here

            this.validatorId = validatorId;
            this.type = type;
            try {
                this.constructor = this.type.getConstructor(CONS_SIG);
            } catch (Exception e) {
                throw new FaceletException(
                        "Must have a Constructor that takes in a ConverterConfig",
                        e);
            }
        }
View Full Code Here

                ValidatorConfig ccfg = new ValidatorConfigWrapper(cfg,
                        this.validatorId);
                return (TagHandler) this.constructor
                        .newInstance(new Object[] { ccfg });
            } catch (InvocationTargetException e) {
                throw new FaceletException(e.getCause().getMessage(), e.getCause().getCause());
            } catch (Exception e) {
                throw new FaceletException("Error Instantiating ValidatorHandler: "+this.type.getName(), e);
            }
        }
View Full Code Here

        String type = (String) this.features.get(name);
        if (type != null) {
            try {
                return Class.forName(type, true, Thread.currentThread().getContextClassLoader()).newInstance();
            } catch (Throwable t) {
                throw new FaceletException("Could not instantiate feature["
                        + name + "]: " + type);
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of com.sun.facelets.FaceletException

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.