public class WiQuerySettings extends Object implements Serializable
Bean to get the wiQuery settings
| Constructor and Description |
|---|
WiQuerySettings()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addListener(WiQueryPluginRenderingListener listener)
Method adding a
WiQueryPluginRenderingListener |
static WiQuerySettings |
get()
Get
WiQuerySettings for current thread. |
org.apache.wicket.markup.html.resources.JavascriptResourceReference |
getJQueryCoreResourceReference() |
ListIterator<WiQueryPluginRenderingListener> |
getListeners() |
boolean |
isAutoImportJQueryResource() |
boolean |
isAutoImportJQueryUIResource() |
boolean |
isEmbedGeneratedStatements() |
boolean |
isEnableResourcesMerging() |
boolean |
isEnableWiqueryResourceManagement() |
boolean |
isMinifiedResources()
When true wiquery delivers minimized versions js/css files, when false
wiquery delivers normal (non-minimized) versions.
|
void |
setAutoImportJQueryResource(boolean autoImportJQueryResource)
Set the autoImportJQueryResource option
|
void |
setAutoImportJQueryUIResource(boolean autoImportJQueryUIResource)
If set to
false, no jQueryUI resources are contributed by
the framework, which means the user is responsible to add required
resources (javascript and css files) for jQueryUI to work. |
void |
setEmbedGeneratedStatements(boolean embedGeneratedStatements)
If set to
false (default), the generated JavaScript statements will be
loaded using a dynamic resource named xxxxxxxx-wiquery-gen.js. |
void |
setEnableResourcesMerging(boolean enableResourcesMerging)
Set the enableResourcesMerging option
|
void |
setEnableWiqueryResourceManagement(boolean enableWiqueryResourceManagement)
If set to
false, all resource contributions by
Wiquery are disabled. |
void |
setJQueryCoreResourceReference(org.apache.wicket.markup.html.resources.JavascriptResourceReference jQueryCoreResourceReference)
Set the jQuery core to use
|
void |
setMinifiedResources(boolean minifiedResources)
Sets the minifiedResources option
|
public static WiQuerySettings get()
WiQuerySettings for current thread.public boolean addListener(WiQueryPluginRenderingListener listener)
WiQueryPluginRenderingListenerlistener - public ListIterator<WiQueryPluginRenderingListener> getListeners()
public boolean isAutoImportJQueryResource()
public boolean isEnableResourcesMerging()
public boolean isEmbedGeneratedStatements()
public boolean isMinifiedResources()
When true wiquery delivers minimized versions js/css files, when false
wiquery delivers normal (non-minimized) versions. The default value
depends on whether an IJavascriptCompressor is used or not.
This setting also enables the
WiQueryYUICompressedStyleSheetResource to be used.
Always provide the normal (non-minimized) version, wiquery will reference
to the minimized version when
WiQuerySettings#isCompressedJavascript() is true.
The filename format for the 2 versions is:
public void setAutoImportJQueryResource(boolean autoImportJQueryResource)
autoImportJQueryResource - public void setEnableResourcesMerging(boolean enableResourcesMerging)
enableResourcesMerging - public void setEmbedGeneratedStatements(boolean embedGeneratedStatements)
false (default), the generated JavaScript statements will be
loaded using a dynamic resource named xxxxxxxx-wiquery-gen.js. To embed the code in your
HTML page, set this option to true.embedGeneratedStatements - public org.apache.wicket.markup.html.resources.JavascriptResourceReference getJQueryCoreResourceReference()
JavascriptResourceReference where we can find the
jQuery corepublic void setJQueryCoreResourceReference(org.apache.wicket.markup.html.resources.JavascriptResourceReference jQueryCoreResourceReference)
jQueryCoreResourceReference - public void setMinifiedResources(boolean minifiedResources)
minifiedResources - isMinifiedResources()public boolean isAutoImportJQueryUIResource()
public void setAutoImportJQueryUIResource(boolean autoImportJQueryUIResource)
false, no jQueryUI resources are contributed by
the framework, which means the user is responsible to add required
resources (javascript and css files) for jQueryUI to work. Useful if one
wants to manage resources globally or use a CDN network to load
resources.
Warning: If version does not match to the version contributed by
the framework, functionality may be harmed!autoImportJQueryUIResource - true to let the framework import required
resources. false to disable automatic resources
contribution by the framework.setEnableWiqueryResourceManagement(boolean)public boolean isEnableWiqueryResourceManagement()
public void setEnableWiqueryResourceManagement(boolean enableWiqueryResourceManagement)
false, all resource contributions by
Wiquery are disabled. No jQuery or jQueryUI resource are contributed by
the framework, nor any resources from plugins. Useful if one wants to
manage resources globally or use a CDN network to load resources.
Warning: By setting this to false the frameworks
functionality (or parts of it) is not guaranteed anymore! Activate only
if you know what you do and import required resources manually.
Sets internally setAutoImportJQueryResource(boolean) and
setAutoImportJQueryUIResource(boolean) to the given value.enableWiqueryResourceManagement - false disables all resources contributions by the
framework. true enables it (default).setAutoImportJQueryResource(boolean),
setAutoImportJQueryUIResource(boolean)Copyright © 2009-2012. All Rights Reserved.