javax.faces.application.ResourceDependency.library()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(70)

本文整理了Java中javax.faces.application.ResourceDependency.library方法的一些代码示例,展示了ResourceDependency.library的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceDependency.library方法的具体详情如下:
包路径:javax.faces.application.ResourceDependency
类名称:ResourceDependency
方法名:library

ResourceDependency.library介绍

暂无

代码示例

代码示例来源:origin: com.github.albfernandez.richfaces/richfaces-core

@Override
  public ResourceKey apply(ResourceDependency resourceDependency) {
    return new ResourceKey(resourceDependency.name(), resourceDependency.library());
  }
};

代码示例来源:origin: com.sun.faces/jsf-impl

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);
  }
}

代码示例来源:origin: org.richfaces/richfaces

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;
  }
}

代码示例来源:origin: org.richfaces.ui/richfaces-components-ui

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;
  }
}

代码示例来源:origin: org.glassfish/jakarta.faces

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);
  }
}

代码示例来源:origin: org.glassfish/javax.faces

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);
  }
}

代码示例来源:origin: eclipse-ee4j/mojarra

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);
  }
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

if (library == null && resource.library() == null)
  if (library != null && library.equals(resource.library()) &&
    name != null && name.equals(resource.name()) )

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

String library = annotation.library();
if (library != null && library.length() > 0)
  new Object[]{annotation.library(), annotation.name()});

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

String library = annotation.library();
if (library != null && library.length() > 0)
  new Object[]{annotation.library(), annotation.name()});

代码示例来源:origin: org.apache.myfaces.test/myfaces-test22

String library = annotation.library();
if (library != null && library.length() > 0)

代码示例来源:origin: org.apache.myfaces.core/myfaces-shaded-impl

String library = annotation.library();
if (library != null && library.length() > 0)

代码示例来源:origin: org.apache.myfaces.core.internal/myfaces-shaded-impl

String library = annotation.library();
if (library != null && library.length() > 0)

代码示例来源:origin: org.apache.myfaces.core/myfaces-shaded-impl

String library = annotation.library();
if (library != null && library.length() > 0)

代码示例来源:origin: org.apache.myfaces.test/myfaces-test22

String library = annotation.library();
if (library != null && library.length() > 0)

代码示例来源:origin: org.apache.myfaces.core.internal/myfaces-shaded-impl

String library = annotation.library();
if (library != null && library.length() > 0)

相关文章

微信公众号

最新文章

更多