Package com.sun.facelets.tag

Examples of com.sun.facelets.tag.TagAttributeException


      {
        _method.invoke(instance, _params);
      }
      catch (InvocationTargetException e)
      {
        throw new TagAttributeException(_attribute, e.getCause());
      }
      catch (Exception e)
      {
        throw new TagAttributeException(_attribute, e);
      }
    }
View Full Code Here


     */
    public DefineHandler(TagConfig config) {
        super(config);
        TagAttribute attr = this.getRequiredAttribute("name");
        if (!attr.isLiteral()) {
            throw new TagAttributeException(this.tag, attr, "Must be Literal");
        }
        this.name = attr.getValue();
    }
View Full Code Here

        super(config);
        this.binding = this.getAttribute("binding");
        this.type = this.getAttribute("type");
        if (type != null) {
            if (!type.isLiteral()) {
                throw new TagAttributeException(this.tag, this.type, "Must be literal");
            }
            try {
                this.listenerType = Class.forName(type.getValue());
            } catch (Exception e) {
                throw new TagAttributeException(this.tag, this.type, e);
            }
        }
    }
View Full Code Here

                }
                if (listener == null) {
                    try {
                        listener = (ActionListener) listenerType.newInstance();
                    } catch (Exception e) {
                        throw new TagAttributeException(this.tag, this.type, e.getCause());
                    }
                    if (ve != null) {
                        ve.setValue(ctx, ve);
                    }
                }
View Full Code Here

            } else {
                bundle = ResourceBundle
                        .getBundle(name, Locale.getDefault(), cl);
            }
        } catch (Exception e) {
            throw new TagAttributeException(this.tag, this.basename, e);
        }
        ResourceBundleMap map = new ResourceBundleMap(bundle);
        FacesContext faces = ctx.getFacesContext();
        faces.getExternalContext().getRequestMap().put(this.var.getValue(ctx),
                map);
View Full Code Here

            }
            if (s.length() >= 7) {
                return new Locale(s.substring(0, 2), s.substring(3, 5)
                        .toUpperCase(), s.substring(6, s.length()));
            }
            throw new TagAttributeException(attr, "Invalid Locale Specified: "
                    + s);
        } else {
            throw new TagAttributeException(attr,
                    "Attribute did not evaluate to a String or Locale: " + obj);
        }
    }
View Full Code Here

                localName = value;
            } else {
                String prefix = value.substring(0, c);
                namespace = this.namespaceManager.getNamespace(prefix);
                if (namespace == null) {
                    throw new TagAttributeException(tag, attr,
                            "No Namespace matched for: " + prefix);
                }
                localName = value.substring(c + 1);
            }
            return new String[] { namespace, localName };
View Full Code Here

                c.setTimeZone((TimeZone) t);
            } else if (t instanceof String) {
                TimeZone tz = TimeZone.getTimeZone((String) t);
                c.setTimeZone(tz);
            } else {
                throw new TagAttributeException(
                        this.tag,
                        this.timeZone,
                        "Illegal TimeZone, must evaluate to either a java.util.TimeZone or String, is type: "
                                + t);
            }
View Full Code Here

        this.type = this.getAttribute("type");
        if (type != null) {
            try {
                this.listenerType = Class.forName(type.getValue());
            } catch (Exception e) {
                throw new TagAttributeException(this.tag, this.type, e);
            }
        }
    }
View Full Code Here

                if (listener == null && this.listenerType != null) {
                    try {
                        listener = (ValueChangeListener) listenerType
                                .newInstance();
                    } catch (Exception e) {
                        throw new TagAttributeException(this.tag, this.type, e);
                    }
                    if (ve != null) {
                        ve.setValue(ctx, ve);
                    }
                } else {
                    throw new TagAttributeException(this.tag, this.binding,
                            "Binding evaluated to null, and there wasn't a 'type' Attribute Specified");
                }
                evh.addValueChangeListener(listener);
            }
        } else {
View Full Code Here

TOP

Related Classes of com.sun.facelets.tag.TagAttributeException

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.