Package com.sun.facelets.tag

Examples of com.sun.facelets.tag.TagAttributeException


                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


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

        if (converter == null) {
          try {
            converter = FacesContext.getCurrentInstance().getApplication().createConverter(
                (String) converterId.getValueExpression(faceletContext, String.class).getValue(faceletContext));
          } catch (Exception e) {
            throw new TagAttributeException(tag, converterId, e.getCause());
          }
          if (valueExpression != null) {
            valueExpression.setValue(faceletContext, converter);
          }
        }
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.