Examples of AttributeKey


Examples of cambridge.model.AttributeKey

    public static BehaviorProvider<FromBehavior> getProvider() {
        return new BehaviorProvider<FromBehavior>() {
            public FromBehavior get(DynamicAttribute keyAttribute, Map<AttributeKey, Attribute> attributes, int line, int col) throws ExpressionParsingException, BehaviorInstantiationException {
                Expression from = keyAttribute.getExpression();
                AttributeKey toKey = new AttributeKey(keyAttribute.getAttributeNameSpace(), "to");

                Attribute toAttribute = attributes.get(toKey);

                if (toAttribute == null || !(toAttribute instanceof DynamicAttribute)) {
                    throw new BehaviorInstantiationException("Required parameters to is not set", line, col);
View Full Code Here

Examples of cambridge.model.AttributeKey

    public static BehaviorProvider<WithBehavior> getProvider() {
        return new BehaviorProvider<WithBehavior>() {
            public WithBehavior get(DynamicAttribute keyAttribute, Map<AttributeKey, Attribute> attributes, int line, int col) throws ExpressionParsingException, BehaviorInstantiationException {

                AttributeKey asKey = new AttributeKey(keyAttribute.getAttributeNameSpace(), "as");
                Attribute asAttribute = attributes.get(asKey);

                return new WithBehavior(keyAttribute.getExpression(), asAttribute == null ? null : asAttribute.getValue(), line, col);
            }
        };
View Full Code Here

Examples of cambridge.model.AttributeKey

    public static BehaviorProvider<ForeachBehavior> getProvider() {
        return new BehaviorProvider<ForeachBehavior>() {
            public ForeachBehavior get(DynamicAttribute keyAttribute, Map<AttributeKey, Attribute> attributes, int line, int col) throws ExpressionParsingException, BehaviorInstantiationException {

                AttributeKey asKey = new AttributeKey(keyAttribute.getAttributeNameSpace(), "as");
                Attribute asAttribute = attributes.get(asKey);

                AttributeKey iterKey = new AttributeKey(keyAttribute.getAttributeNameSpace(), "iter");
                Attribute iterAttribute = attributes.get(iterKey);

                Expression e = keyAttribute.getExpression();
                return new ForeachBehavior(e, asAttribute == null ? null : asAttribute.getValue(), iterAttribute == null ? null : iterAttribute.getValue(), line, col);
            }
View Full Code Here

Examples of cambridge.model.AttributeKey

      this.namespace = namespace;
      this.attribute = attribute;
   }

   public AttributeKey toAttributeKey() {
      return new AttributeKey(namespace, attribute);
   }
View Full Code Here

Examples of cambridge.model.AttributeKey

    public static BehaviorProvider<ForeachBehavior> getProvider() {
        return new BehaviorProvider<ForeachBehavior>() {
            public ForeachBehavior get(DynamicAttribute keyAttribute, Map<AttributeKey, Attribute> attributes, int line, int col) throws ExpressionParsingException, BehaviorInstantiationException {

                AttributeKey asKey = new AttributeKey(keyAttribute.getAttributeNameSpace(), "as");
                Attribute asAttribute = attributes.get(asKey);

                AttributeKey iterKey = new AttributeKey(keyAttribute.getAttributeNameSpace(), "iter");
                Attribute iterAttribute = attributes.get(iterKey);

                Expression e = keyAttribute.getExpression();
                return new ForeachBehavior(e, asAttribute == null ? null : asAttribute.getValue(), iterAttribute == null ? null : iterAttribute.getValue(), line, col);
            }
View Full Code Here

Examples of cambridge.model.AttributeKey

    public static BehaviorProvider<FromBehavior> getProvider() {
        return new BehaviorProvider<FromBehavior>() {
            public FromBehavior get(DynamicAttribute keyAttribute, Map<AttributeKey, Attribute> attributes, int line, int col) throws ExpressionParsingException, BehaviorInstantiationException {
                Expression from = keyAttribute.getExpression();
                AttributeKey toKey = new AttributeKey(keyAttribute.getAttributeNameSpace(), "to");

                Attribute toAttribute = attributes.get(toKey);

                if (toAttribute == null || !(toAttribute instanceof DynamicAttribute)) {
                    throw new BehaviorInstantiationException("Required parameters to is not set", line, col);
View Full Code Here

Examples of cambridge.model.AttributeKey

    public static BehaviorProvider<WithBehavior> getProvider() {
        return new BehaviorProvider<WithBehavior>() {
            public WithBehavior get(DynamicAttribute keyAttribute, Map<AttributeKey, Attribute> attributes, int line, int col) throws ExpressionParsingException, BehaviorInstantiationException {

                AttributeKey asKey = new AttributeKey(keyAttribute.getAttributeNameSpace(), "as");
                Attribute asAttribute = attributes.get(asKey);

                return new WithBehavior(keyAttribute.getExpression(), asAttribute == null ? null : asAttribute.getValue(), line, col);
            }
        };
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.AttributeKey

        }
        else
        {
          Object o = super.put(key, value);
          // Push the value into the UINode if necessary
          AttributeKey attrKey = getAttributeKey(key);
          if (attrKey != null)
            _node.setAttributeValue(attrKey, value);
          return o;
        }
      }

      public Object remove(PropertyKey key)
      {
        Object o = super.remove(key);
        if (o == null)
          return null;

        AttributeKey attrKey = getAttributeKey(key);
        if (attrKey != null)
        {
          // We're no longer shadowing a ValueBinding (if one's present);
          // re-establish that binding, or reset to null
          Object attrValue;
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.AttributeKey

          return remove(key);
        }
        else
        {
          Object o = super.put(key, value);
          AttributeKey attrKey = getAttributeKey(key);
          if (attrKey != null)
          {
            // If there's no local value, then we're not shadowing;
            // set up a new ValueBindingBoundValue
            if (getLocalProperty(key) == null)
            {
              ValueBinding binding = (ValueBinding) value;
              _node.setAttributeValue(attrKey,
                                      new ValueBindingBoundValue(binding));
            }
          }

          return o;
        }
      }

      public Object remove(PropertyKey key)
      {
        Object o = super.remove(key);
        if (o == null)
          return null;

        AttributeKey attrKey = getAttributeKey(key);
        if (attrKey != null)
        {
          // If there's no local value, then we're not shadowing,
          // and the value is just null now
          if (getLocalProperty(key) == null)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.AttributeKey

    Iterator<AttributeKey> attrs = node.getAttributeNames(context);
    if (attrs != null)
    {
      while (attrs.hasNext())
      {
        AttributeKey currKey = attrs.next();
        if ((currKey != UIConstants.RENDERED_ATTR) &&
            (currKey != UIConstants.ANNOTATION_ATTR))
          renderAttribute(context,
                          currKey.getAttributeName(),
                          node.getAttributeValue(context, currKey));
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.