use of org.grails.core.DefaultGrailsTagLibClass in project grails-core by grails.
the class StandaloneTagLibraryLookup method detectAndRegisterTabLibBeans.
public void detectAndRegisterTabLibBeans() {
if (tagLibInstancesSet == null) {
tagLibInstancesSet = new LinkedHashSet<Object>();
}
Collection<Object> detectedInstances = applicationContext.getBeansWithAnnotation(TagLib.class).values();
for (Object instance : detectedInstances) {
if (!tagLibInstancesSet.contains(instance)) {
tagLibInstancesSet.add(instance);
registerTagLib(new DefaultGrailsTagLibClass(instance.getClass()));
}
}
}
use of org.grails.core.DefaultGrailsTagLibClass in project grails-core by grails.
the class LazyTagLibraryLookup method registerLazyLoadableTagLibClass.
public void registerLazyLoadableTagLibClass(Class tagLibClass) {
GrailsTagLibClass grailsTagLibClass = new DefaultGrailsTagLibClass(tagLibClass);
if (!hasNamespace(grailsTagLibClass.getNamespace())) {
registerNamespaceDispatcher(grailsTagLibClass.getNamespace());
}
for (String tagName : grailsTagLibClass.getTagNames()) {
String tagKey = tagNameKey(grailsTagLibClass.getNamespace(), tagName);
lazyLoadableTagLibs.put(tagKey, grailsTagLibClass);
}
}
Aggregations