protected String getFullNamespacePrefix(String referenceNamespace) { return getFullNamespacePrefix(referenceNamespace, true); }
protected String getFullNamespacePrefix(String referenceNamespace) { return getFullNamespacePrefix(referenceNamespace, true); }
public Map<String, Object> getAttributeMap(String referencePath) { String namespace = getReferenceNamespacePath(referencePath); String prefix = getFullNamespacePrefix(namespace); int prefixLen = prefix.length(); Map<String, Object> attributesMap = this.namespaceAttributesMap.get(prefix); if (attributesMap == null) { attributesMap = new HashMap<String, Object>(); for (Enumeration attributeNames = super.getAttributeNames(); attributeNames.hasMoreElements(); ) { String encodedAttributeName = (String) attributeNames.nextElement(); if (encodedAttributeName.startsWith(prefix)) { String attributeName = encodedAttributeName.substring(prefixLen); Object attributeValue = super.getAttribute(encodedAttributeName); attributesMap.put(attributeName, attributeValue); } } this.namespaceAttributesMap.put(prefix, attributesMap); } return attributesMap; }
public Map<String, Object> getAttributeMap(String referencePath) { String namespace = getReferenceNamespacePath(referencePath); String prefix = getFullNamespacePrefix(namespace); int prefixLen = prefix.length(); Map<String, Object> attributesMap = this.namespaceAttributesMap.get(prefix); if (attributesMap == null) { attributesMap = new HashMap<String, Object>(); for (Enumeration attributeNames = super.getAttributeNames(); attributeNames.hasMoreElements(); ) { String encodedAttributeName = (String) attributeNames.nextElement(); if (encodedAttributeName.startsWith(prefix)) { String attributeName = encodedAttributeName.substring(prefixLen); Object attributeValue = super.getAttribute(encodedAttributeName); attributesMap.put(attributeName, attributeValue); } } this.namespaceAttributesMap.put(prefix, attributesMap); } return attributesMap; }
String prefix = getFullNamespacePrefix(namespace); String targetComponentReferencePrefix = (isRenderPhase ? "" : getFullNamespacePrefix(getReferenceNamespace())); boolean emptyTargetComponentReferencePrefix = "".equals(targetComponentReferencePrefix);
String prefix = getFullNamespacePrefix(namespace); String targetComponentReferencePrefix = (isRenderPhase ? "" : getFullNamespacePrefix(getReferenceNamespace())); boolean emptyTargetComponentReferencePrefix = "".equals(targetComponentReferencePrefix); boolean namespacedParameter = false;
@Override public void removeAttribute(String name) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } if (isContainerAttributeName(name)) { super.removeAttribute(name); } else { getAttributeMap().remove(name); String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); super.removeAttribute(prefix + name); } }
@Override public void removeAttribute(String name) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } if (isContainerAttributeName(name)) { super.removeAttribute(name); } else { Object value = getAttributeMap().remove(name); String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); super.removeAttribute(prefix + name); } }
@Override public void setAttribute(String name, Object value) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } if (value == null) { removeAttribute(name); } else if (isContainerAttributeName(name)) { super.setAttribute(name, value); } else { getAttributeMap().put(name, value); String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); super.setAttribute(prefix + name, value); } }
@Override public void setAttribute(String name, Object value) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } if (value == null) { removeAttribute(name); } else if (isContainerAttributeName(name)) { super.setAttribute(name, value); } else { getAttributeMap().put(name, value); String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); super.setAttribute(prefix + name, value); } }
@Override public Object getAttribute(String name) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } Object value; if (isContainerAttributeName(name)) { value = super.getAttribute(name); } else { value = getAttributeMap().get(name); if (value == null) { String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); value = super.getAttribute(prefix + name); if (value == null) { value = super.getAttribute(name); } } } return value; }
@Override public Object getAttribute(String name) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } Object value = null; if (isContainerAttributeName(name)) { value = super.getAttribute(name); } else { value = getAttributeMap().get(name); if (value == null) { String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); value = super.getAttribute(prefix + name); if (value == null) { value = super.getAttribute(name); } } } return value; }