Package com.sun.facelets.tag

Examples of com.sun.facelets.tag.TagAttribute


      metaRuleset.ignore(TobagoConstants.ATTR_VALUE);
      return metaRuleset;
    } else {
      TagAttribute [] attrs = tag.getAttributes().getAll();
      for (int i = 0; i < attrs.length; i++) {
        TagAttribute attr = attrs[i];
        if (!(attr.getLocalName().equals(TobagoConstants.ATTR_CONVERTER)
            || attr.getLocalName().equals(TobagoConstants.ATTR_VALUE))) {
          metaRuleset.ignore(attr.getLocalName());
        }
      }
      return metaRuleset;
    }
  }
View Full Code Here


        protected TagAttributes createAttributes(Attributes attrs) {
            int len = attrs.getLength();
            TagAttribute[] ta = new TagAttribute[len];
            for (int i = 0; i < len; i++) {
                ta[i] = new TagAttribute(this.createLocation(),
                        attrs.getURI(i), attrs.getLocalName(i), attrs
                                .getQName(i), attrs.getValue(i));
            }
            return new TagAttributes(ta);
        }
View Full Code Here

  private final String listenerType;

  public PhaseListenerHandler(TagConfig config) {
    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 {
      this.listenerType = null;
    }
  }
View Full Code Here

     * @param config
     */
    public ActionListenerHandler(TagConfig config) {
        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 {
      this.listenerType = null;
    }
    }
View Full Code Here

  private final String listenerType;

  public ValueChangeListenerHandler(TagConfig config) {
    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 {
      this.listenerType = null;
    }
  }
View Full Code Here

    public FaceletsExpressionCreator(FaceletContext faceletContext) {
        this.faceletContext = faceletContext;
    }

    public ValueExpression createValueExpression(FacesContext facesContext, String attributeName, String attributeValue, Class type) {
        TagAttribute attribute = getAttribute(attributeName);
        ValueExpression valueExpression = (type != null)
                ? attribute.getValueExpression(faceletContext, type)
                : attribute.getValueExpression(faceletContext, Object.class);
        return valueExpression;
    }
View Full Code Here

                : attribute.getValueExpression(faceletContext, Object.class);
        return valueExpression;
    }

    public boolean isValueReference(String propertyName, String value) {
        TagAttribute attribute = getAttribute(propertyName);
        return !attribute.isLiteral();
    }
View Full Code Here

            String attributeName,
            String actionDeclaration,
            Class returnType,
            Class[] paramTypes
    ) {
        TagAttribute attribute = getAttribute(attributeName);
        if (paramTypes == null)
            paramTypes = EMPTY_ARRAY;
        MethodExpression methodExpression = attribute.getMethodExpression(faceletContext, returnType, paramTypes);
        return methodExpression;
    }
View Full Code Here

        Location location = new Location("cdr", 1, 2);
        String ns = "urn:unk";
        tag = new Tag(location,
            ns, "tag", null,
            new TagAttributes(new TagAttribute[] {
              new TagAttribute(location, "", "beanName", null, beanName)
              new TagAttribute(location, "", "ajaxOnly", null, String.valueOf(ajaxOnly)) 
            }));
      }
     
      public FaceletHandler getNextHandler() {
        return null;
View Full Code Here

    /**
     * @param config
     */
    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

TOP

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

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.