org.apache.wicket.resource
Class DynamicJQueryResourceReference
java.lang.Object
org.apache.wicket.request.resource.ResourceReference
org.apache.wicket.request.resource.PackageResourceReference
org.apache.wicket.request.resource.JavaScriptResourceReference
org.apache.wicket.resource.JQueryResourceReference
org.apache.wicket.resource.DynamicJQueryResourceReference
- All Implemented Interfaces:
- Serializable, IClusterable
public class DynamicJQueryResourceReference
- extends JQueryResourceReference
A resource reference that calculates which version of jQuery JavaScript library to use depending
on the user agent. For IE 6/7/8 jQuery ver. 1.x will be used, for any other browser - ver. 2.x.
To use this resource reference do:
app.getJavaScriptLibrarySettings().setJQueryReference(new DynamicJQueryResourceReference())
- Since:
- 6.9.0
- See Also:
- Serialized Form
VERSION_2
public static final String VERSION_2
- jQuery ver. 2.x - works only on modern browsers
- See Also:
- Constant Field Values
DynamicJQueryResourceReference
public DynamicJQueryResourceReference()
getName
public String getName()
- Description copied from class:
PackageResourceReference
- Returns the name of the file: minified or full version. This method is called in a
multithreaded context, so it has to be thread safe.
- Overrides:
getName
in class PackageResourceReference
- Returns:
- name
- See Also:
ResourceReference.getName()
getVersion1
protected String getVersion1()
getVersion2
protected String getVersion2()
getScope
public Class<?> getScope()
- Overrides:
getScope
in class ResourceReference
- Returns:
- scope
Copyright © 2006–2013 Apache Software Foundation. All rights reserved.