protected void setBehaviorAttribute(FaceletContext ctx, E behavior, TagAttribute attr, Class<?> type) { if (attr != null) { String attributeName = attr.getLocalName(); if (attr.isLiteral()) { behavior.setLiteral(attributeName, attr.getObject(ctx, type)); } else { behavior.setValueExpression(attributeName, attr.getValueExpression(ctx, type)); } } }
private TagAttributes removeType(TagAttributes attrs) { TagAttribute[] o = attrs.getAll(); TagAttribute[] a = new TagAttribute[o.length - 1]; int p = 0; for (int i = 0; i < o.length; i++) { if (!"type".equals(o[i].getLocalName())) { a[p++] = o[i]; } } return new TagAttributesImpl(a); }
private TagAttributes removeType(TagAttributes attrs) { TagAttribute[] o = attrs.getAll(); TagAttribute[] a = new TagAttribute[o.length - 1]; int p = 0; for (int i = 0; i < o.length; i++) { if (!"type".equals(o[i].getLocalName())) { a[p++] = o[i]; } } return new TagAttributesImpl(a); }
private TagAttributes removeType(TagAttributes attrs) { TagAttribute[] o = attrs.getAll(); TagAttribute[] a = new TagAttribute[o.length - 1]; int p = 0; for (int i = 0; i < o.length; i++) { if (!"type".equals(o[i].getLocalName())) { a[p++] = o[i]; } } return new TagAttributesImpl(a); }
private TagAttributes removeType(TagAttributes attrs) { TagAttribute[] o = attrs.getAll(); TagAttribute[] a = new TagAttribute[o.length - 1]; int p = 0; for (int i = 0; i < o.length; i++) { if (!"type".equals(o[i].getLocalName())) { a[p++] = o[i]; } } return new TagAttributesImpl(a); }
private static TagAttributes removeType(TagAttributes attrs) { TagAttribute[] o = attrs.getAll(); TagAttribute[] a = new TagAttribute[o.length - 1]; int p = 0; for (int i = 0; i < o.length; i++) { if (!"type".equals(o[i].getLocalName())) { a[p++] = o[i]; } } return new TagAttributesImpl(a); }
private void setAttribute(FaceletContext context, TagAttribute tagAttribute, AnimationBehavior behavior, Class type) { if (tagAttribute != null) { behavior.setValueExpression(tagAttribute.getLocalName(), tagAttribute.getValueExpression(context, type)); } }
public TagAttributesAlloyImpl(TagAttributes tagAttributes) { TagAttribute[] tagAttributesArray = tagAttributes.getAll(); for (TagAttribute tagAttribute : tagAttributesArray) { String localName = tagAttribute.getLocalName(); if (!Renderer.PASSTHROUGH_RENDERER_LOCALNAME_KEY.equals(localName)) { String namespace = tagAttribute.getNamespace(); String mapKey = getMapKey(namespace, localName); this.tagAttributeMap.put(mapKey, tagAttribute); } } }
public TagAttributesAlloyImpl(TagAttributes tagAttributes) { TagAttribute[] tagAttributesArray = tagAttributes.getAll(); for (TagAttribute tagAttribute : tagAttributesArray) { String localName = tagAttribute.getLocalName(); if (!ELEMENT_NAME.equals(localName)) { String namespace = tagAttribute.getNamespace(); String mapKey = getMapKey(namespace, localName); this.tagAttributeMap.put(mapKey, tagAttribute); } } }
private void setBehaviorAttribute(FaceletContext ctx, AjaxBehavior behavior, TagAttribute attr, Class type) { if (attr != null) { behavior.setValueExpression(attr.getLocalName(), attr.getValueExpression(ctx, type)); } }
private void setBehaviorAttribute(FaceletContext ctx, AjaxBehavior behavior, TagAttribute attr, Class type) { if (attr != null) { behavior.setValueExpression(attr.getLocalName(), attr.getValueExpression(ctx, type)); } }
private void setBehaviorAttribute(FaceletContext ctx, AjaxBehavior behavior, TagAttribute attr, Class type) { if (attr != null) { behavior.setValueExpression(attr.getLocalName(), attr.getValueExpression(ctx, type)); } }
public TagAttributesAlloyImpl(TagAttributes tagAttributes) { TagAttribute[] tagAttributesArray = tagAttributes.getAll(); for (TagAttribute tagAttribute : tagAttributesArray) { String localName = tagAttribute.getLocalName(); if (!Renderer.PASSTHROUGH_RENDERER_LOCALNAME_KEY.equals(localName)) { String namespace = tagAttribute.getNamespace(); String mapKey = getMapKey(namespace, localName); this.tagAttributeMap.put(mapKey, tagAttribute); } } }
private void setBehaviorAttribute(FaceletContext ctx, AjaxBehavior behavior, TagAttribute attr, Class type) { if (attr != null) { behavior.setValueExpression(attr.getLocalName(), attr.getValueExpression(ctx, type)); } }
public void replaceAttribute(String old, String replacement) { for (int i = 0; i < attrs.length;i++) { TagAttribute a = attrs[i]; if (a.getLocalName().equals(old)) { a = TagAttributeUtilities.createTagAttribute(a.getLocation(), JSF_NAMESPACE, replacement, replacement, a.getValue()); attrs[i] = a; } } }
public void replaceAttributeValue(String name, String newValue) { for (int i = 0; i < attrs.length;i++) { TagAttribute a = attrs[i]; if (a.getLocalName().equals(name)) { a = TagAttributeUtilities.createTagAttribute(a.getLocation(), JSF_NAMESPACE, name, a.getQName(), newValue); attrs[i] = a; } } }
public void replaceAttributeValue(String name, String newValue) { for (int i = 0; i < attrs.length;i++) { TagAttribute a = attrs[i]; if (a.getLocalName().equals(name)) { a = TagAttributeUtilities.createTagAttribute(a.getLocation(), JSF_NAMESPACE, name, a.getQName(), newValue); attrs[i] = a; } } }
public void replaceAttribute(String old, String replacement) { for (int i = 0; i < attrs.length;i++) { TagAttribute a = attrs[i]; if (a.getLocalName().equals(old)) { a = TagAttributeUtilities.createTagAttribute(a.getLocation(), JSF_NAMESPACE, replacement, replacement, a.getValue()); attrs[i] = a; } } }
public static void copyPassthroughAttributes(FaceletContext ctx, UIComponent c, Tag t) { if (null == c || null == t) { return; } TagAttribute[] passthroughAttrs = t.getAttributes().getAll(PassThroughAttributeLibrary.Namespace); if (null != passthroughAttrs && 0 < passthroughAttrs.length) { Map<String, Object> componentPassthroughAttrs = c.getPassThroughAttributes(true); Object attrValue = null; for (TagAttribute cur : passthroughAttrs) { attrValue = (cur.isLiteral()) ? cur.getValue(ctx) : cur.getValueExpression(ctx, Object.class); componentPassthroughAttrs.put(cur.getLocalName(), attrValue); } } }
protected void setBehaviorAttribute(FaceletContext ctx, E behavior, TagAttribute attr, Class<?> type) { if (attr != null) { String attributeName = attr.getLocalName(); if (attr.isLiteral()) { behavior.setLiteral(attributeName, attr.getObject(ctx, type)); } else { behavior.setValueExpression(attributeName, attr.getValueExpression(ctx, type)); } } }