/** * Using no namespace, find the TagAttribute * * @see #get(String, String) * @param localName * tag attribute name * @return the TagAttribute found, otherwise null */ public TagAttribute get(String localName) { return get("", localName); }
private Tag trimJSFCAttribute(Tag tag) { TagAttribute attr = tag.getAttributes().get("jsfc"); if (attr != null) { TagAttribute[] oa = tag.getAttributes().getAll(); TagAttribute[] na = new TagAttribute[oa.length - 1]; int p = 0; for (int i = 0; i < oa.length; i++) { if (!"jsfc".equals(oa[i].getLocalName())) { na[p++] = oa[i]; } } return new Tag(tag, new TagAttributes(na)); } return tag; }
/** * Utility method for fetching the appropriate TagAttribute * * @param localName * name of attribute * @return TagAttribute if found, otherwise null */ protected final TagAttribute getAttribute(String localName) { return this.tag.getAttributes().get(localName); }
protected MetaRuleset createMetaRuleset(Class type) { TagAttributes attributes = this.tag.getAttributes(); TagAttribute attribute = attributes.get("value"); if (attribute != null && attributes.get("selectedTab") != null) { TagAttribute idAttribute = attributes.get("id"); FacesContext facesContext = FacesContext.getCurrentInstance(); facesContext.getExternalContext().log("selectedTab attribute has been already set for component with id: " + idAttribute != null ? idAttribute.getValue() : null + "[" + attribute.getValue() + "]. value attribute is deprecated and thus has been dropped!"); } return super.createMetaRuleset(type).alias("selectedTab", "value"); }
protected MetaRuleset createMetaRuleset(Class type) { TagAttributes attributes = this.tag.getAttributes(); TagAttribute eventAttribute = attributes.get("event"); TagAttribute showEventAttribute = attributes.get("showEvent"); MetaRuleset ruleset = super.createMetaRuleset(type); if (eventAttribute != null) { if (showEventAttribute != null) { TagAttribute idAttribute = attributes.get("id"); FacesContext facesContext = FacesContext.getCurrentInstance(); facesContext.getExternalContext().log("showEvent attribute has been already set for component with id: " + idAttribute != null ? idAttribute.getValue() : null + "[" + eventAttribute.getValue() + "]. event attribute is deprecated and thus has been dropped!"); ruleset.ignore("event"); } else { ruleset.alias("event", "showEvent"); } } return ruleset; } }
private String[] determineQName(Tag tag) { TagAttribute attr = tag.getAttributes().get("jsfc"); if (attr != null) { if (log.isLoggable(Level.FINE)) { log.fine(attr + " JSF Facelet Compile Directive Found"); } String value = attr.getValue(); String namespace, localName; int c = value.indexOf(':'); if (c == -1) { namespace = this.namespaceManager.getNamespace(""); 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 }; } else { return new String[] { tag.getNamespace(), tag.getLocalName() }; } }
TagAttribute attr = tag.getAttributes().get("type"); if (attr != null) { String t = attr.getValue();