Class YuiHeaderCache
- java.lang.Object
-
- org.hippoecm.frontend.plugins.yui.header.YuiHeaderCache
-
- All Implemented Interfaces:
Serializable
,org.apache.wicket.markup.html.IHeaderContributor
,org.apache.wicket.util.io.IClusterable
public class YuiHeaderCache extends Object implements org.apache.wicket.markup.html.IHeaderContributor
A Wicket Ajax request can generate a response containing additional javascript and css resources to be loaded on the client. Subsequently requesting a component that depends on, for example, six YUI-modules that have to be loaded in a pre-defined order, will lead to lot's of redundant data in the response, not to mention the IO and file parsing that is produced by the YUI module loading mechanism on the server.This class uses the
CachedYuiDependencyResolver
to retrieve theSet
of resources belonging to a YUI-module and caches them locally.YuiContext
s will share a reference to the resources, making it possible to skip static resources that have already been loaded on the client.It will automatically load the YUI-logger through it's local
IYuiContext
when running in Wicket development mode. SeeApplication.getConfigurationType()
.
It will also the Wicket-Ajax javascript dependencies if needed and subsequently load the hippoajax YUI module, which adds cleanup-hooks for YUI modules as well as some other utility methods.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description YuiHeaderCache(boolean loadWicketAjax)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
-