@Override public ResourceKey apply(ResourceDependency resourceDependency) { return new ResourceKey(resourceDependency.name(), resourceDependency.library()); } };
public ResourceDependencyHandler(ResourceDependency[] dependencies) { this.dependencies = dependencies; Map<Object, Object> attrs = FacesContext.getCurrentInstance().getAttributes(); expressionsMap = new HashMap<ResourceDependency,Expressions>(dependencies.length, 1.0f); for (ResourceDependency dep : dependencies) { Expressions exprs = new Expressions(); exprs.name = dep.name(); String lib = dep.library(); if (lib.length() > 0) { // Take special action to resolve the "this" library name if ("this".equals(lib)) { String thisLibrary = (String) attrs.get(com.sun.faces.application.ApplicationImpl.THIS_LIBRARY); assert(null != thisLibrary); lib = thisLibrary; } exprs.library = lib; } String tgt = dep.target(); if (tgt.length() > 0) { exprs.target = tgt; } expressionsMap.put(dep, exprs); } }
private static LibraryFunction getScriptFromAnnotation(Class<?> javaClass) { if (javaClass.isAnnotationPresent(ClientSideScript.class)) { ClientSideScript clientSideScript = javaClass.getAnnotation(ClientSideScript.class); List<ResourceKey> resources = Lists.newArrayList(); for (ResourceDependency dependency : clientSideScript.resources()) { resources.add(ResourceKey.create(dependency.name(), dependency.library())); } return new LibraryFunctionImplementation(clientSideScript.function(), resources); } else { return NO_SCRIPT; } }
private static LibraryFunction getScriptFromAnnotation(Class<?> javaClass) { if (javaClass.isAnnotationPresent(ClientSideScript.class)) { ClientSideScript clientSideScript = javaClass.getAnnotation(ClientSideScript.class); List<ResourceKey> resources = Lists.newArrayList(); for (ResourceDependency dependency : clientSideScript.resources()) { resources.add(ResourceKey.create(dependency.name(), dependency.library())); } return new LibraryFunctionImplementation(clientSideScript.function(), resources); } else { return NO_SCRIPT; } }
public ResourceDependencyHandler(ResourceDependency[] dependencies) { this.dependencies = dependencies; Map<Object, Object> attrs = FacesContext.getCurrentInstance().getAttributes(); expressionsMap = new HashMap<>(dependencies.length, 1.0f); for (ResourceDependency dep : dependencies) { Expressions exprs = new Expressions(); exprs.name = dep.name(); String lib = dep.library(); if (lib.length() > 0) { // Take special action to resolve the "this" library name if ("this".equals(lib)) { String thisLibrary = (String) attrs.get(com.sun.faces.application.ApplicationImpl.THIS_LIBRARY); assert(null != thisLibrary); lib = thisLibrary; } exprs.library = lib; } String tgt = dep.target(); if (tgt.length() > 0) { exprs.target = tgt; } expressionsMap.put(dep, exprs); } }
public ResourceDependencyHandler(ResourceDependency[] dependencies) { this.dependencies = dependencies; Map<Object, Object> attrs = FacesContext.getCurrentInstance().getAttributes(); expressionsMap = new HashMap<>(dependencies.length, 1.0f); for (ResourceDependency dep : dependencies) { Expressions exprs = new Expressions(); exprs.name = dep.name(); String lib = dep.library(); if (lib.length() > 0) { // Take special action to resolve the "this" library name if ("this".equals(lib)) { String thisLibrary = (String) attrs.get(com.sun.faces.application.ApplicationImpl.THIS_LIBRARY); assert(null != thisLibrary); lib = thisLibrary; } exprs.library = lib; } String tgt = dep.target(); if (tgt.length() > 0) { exprs.target = tgt; } expressionsMap.put(dep, exprs); } }
public ResourceDependencyHandler(ResourceDependency[] dependencies) { this.dependencies = dependencies; Map<Object, Object> attrs = FacesContext.getCurrentInstance().getAttributes(); expressionsMap = new HashMap<>(dependencies.length, 1.0f); for (ResourceDependency dep : dependencies) { Expressions exprs = new Expressions(); exprs.name = dep.name(); String lib = dep.library(); if (lib.length() > 0) { // Take special action to resolve the "this" library name if ("this".equals(lib)) { String thisLibrary = (String) attrs.get(com.sun.faces.application.ApplicationImpl.THIS_LIBRARY); assert(null != thisLibrary); lib = thisLibrary; } exprs.library = lib; } String tgt = dep.target(); if (tgt.length() > 0) { exprs.target = tgt; } expressionsMap.put(dep, exprs); } }
String name = annotation.name(); if (name != null && name.length() > 0)
String name = annotation.name(); if (name != null && name.length() > 0)
String name = annotation.name(); if (name != null && name.length() > 0)
String name = annotation.name(); if (name != null && name.length() > 0)
String name = annotation.name(); if (name != null && name.length() > 0)
String name = annotation.name(); if (name != null && name.length() > 0)