List of usage examples for org.apache.commons.jelly TagSupport findAncestorWithClass
public static Tag findAncestorWithClass(Tag from, Class[] tagClasses)
From source file:hudson.Functions.java
/** * Used to assist form databinding. Given the "attrs" object, * find the ancestor tag file of the given name. *//*from w w w. ja va 2 s . c o m*/ public Tag findAncestorTag(Map attributes, String nsUri, String local) { Tag tag = (Tag) attributes.get("ownerTag"); if (tag == null) return null; while (true) { tag = TagSupport.findAncestorWithClass(tag.getParent(), StaplerDynamicTag.class); if (tag == null) return null; StaplerDynamicTag stag = (StaplerDynamicTag) tag; if (stag.getLocalName().equals(local) && stag.getNsUri().equals(nsUri)) return tag; } }