Package com.sun.facelets.tag

Examples of com.sun.facelets.tag.TagAttributeException


    super(config);
    this.binding = this.getAttribute("binding");
        TagAttribute type = this.getAttribute("type");
    if (type != null) {
      if (!type.isLiteral()) {
        throw new TagAttributeException(type,
            "Must be a literal class name of type ValueChangeListener");
      } else {
        // test it out
        try {
          ReflectionUtil.forName(type.getValue());
        } catch (ClassNotFoundException e) {
          throw new TagAttributeException(type,
              "Couldn't qualify ValueChangeListener", e);
        }
      }
      this.listenerType = type.getValue();
    } else {
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

    super(config);
        TagAttribute type = this.getAttribute("type");
    this.binding = this.getAttribute("binding");
    if (type != null) {
      if (!type.isLiteral()) {
        throw new TagAttributeException(type,
            "Must be a literal class name of type PhaseListener");
      } else {
        // test it out
        try {
          ReflectionUtil.forName(type.getValue());
        } catch (ClassNotFoundException e) {
          throw new TagAttributeException(type,
              "Couldn't qualify PhaseListener", e);
        }
      }
      this.listenerType = type.getValue();
    } else {
View Full Code Here

        super(config);
        this.binding = this.getAttribute("binding");
        TagAttribute type = this.getAttribute("type");
        if (type != null) {
      if (!type.isLiteral()) {
        throw new TagAttributeException(type,
            "Must be a literal class name of type ActionListener");
      } else {
        // test it out
        try {
          ReflectionUtil.forName(type.getValue());
        } catch (ClassNotFoundException e) {
          throw new TagAttributeException(type,
              "Couldn't qualify ActionListener", e);
        }
      }
      this.listenerType = type.getValue();
    } else {
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

     */
    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

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

        }
        if (changeListener == null) {
          try {
            changeListener = (TabChangeListener) listenerType.newInstance();
          } catch (Exception e) {
            throw new TagAttributeException(tag, type, e.getCause());
          }
          if (valueExpression != null) {
            valueExpression.setValue(faceletContext, changeListener);
          }
        }
View Full Code Here

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

        }
        if (listener == null) {
          try {
            listener = (TabChangeListener) listenerType.newInstance();
          } catch (Exception e) {
            throw new TagAttributeException(tag, type, e.getCause());
          }
          if (valueExpression != null) {
            valueExpression.setValue(faceletContext, listener);
          }
        }
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.