Example usage for org.apache.wicket.request.resource ResourceReference getKey

List of usage examples for org.apache.wicket.request.resource ResourceReference getKey

Introduction

In this page you can find the example usage for org.apache.wicket.request.resource ResourceReference getKey.

Prototype

public final Key getKey() 

Source Link

Usage

From source file:org.hippoecm.frontend.plugins.standards.image.InlineSvg.java

License:Apache License

public InlineSvg(final String id, final ResourceReference reference, final String... cssClasses) {
    super(id);//from  ww w . ja va  2s . c  o  m

    this.extraCssClasses = cssClasses;

    if (reference instanceof PackageResourceReference) {
        this.reference = (PackageResourceReference) reference;
    } else {
        this.reference = new PackageResourceReference(reference.getKey());
    }
    setRenderBodyOnly(true);
}

From source file:org.hippoecm.frontend.plugins.yui.header.YuiHeaderCache.java

License:Apache License

HeaderItem getCssReference(ResourceReference reference) {
    if (referencesCache.containsKey(reference.getKey())) {
        return referencesCache.get(reference.getKey());
    } else {/*from w ww . j a  v  a  2  s.  c  om*/
        CssHeaderContributor ref = new CssHeaderContributor(reference);
        referencesCache.put(reference.getKey(), ref);
        return ref;
    }
}

From source file:org.hippoecm.frontend.plugins.yui.header.YuiHeaderCache.java

License:Apache License

HeaderItem getJavaScriptReference(ResourceReference reference) {
    if (referencesCache.containsKey(reference.getKey())) {
        return referencesCache.get(reference.getKey());
    } else {/*w w  w. j a v a2 s.co  m*/
        JavaScriptHeaderContributor ref = new JavaScriptHeaderContributor(reference);
        referencesCache.put(reference.getKey(), ref);
        return ref;
    }
}