public interface IYuiContext
extends org.apache.wicket.markup.html.IHeaderContributor
DynamicTextTemplate
s and FinalTextTemplate
s.
Implementations are responsible for loading YUI-modules and filtering static resources from subsequent requests, to
minimize the response footprint.Modifier and Type | Method and Description |
---|---|
void |
addCssReference(org.apache.wicket.request.resource.ResourceReference reference)
Helper method for adding css reference
|
void |
addJavascriptReference(org.apache.wicket.request.resource.ResourceReference reference)
Helper method for adding a javascript reference
|
void |
addModule(String module)
Load YUI module from the
YahooNamespace context |
void |
addModule(org.onehippo.yui.YuiNamespace namespace,
String module)
Load YUI module from the specified
YuiNamespace context |
void |
addOnDomLoad(org.apache.wicket.model.IModel<String> model)
Add dynamic javascript that will be executed on the browsers' dom-ready event.
|
void |
addOnDomLoad(String onload)
Add static javascript
String that will be executed on the browsers' dom-ready event |
void |
addOnWinLoad(org.apache.wicket.model.IModel<String> model)
Add dynamic javascript that will be executed on the browsers' window-load event.
|
void |
addOnWinLoad(String onload)
Add static javascript
String that will be executed on the browsers' window-load event |
void |
addTemplate(Class<?> clazz,
String filename,
Map<String,Object> parameters)
Add a static
TextTemplate to the response. |
void |
addTemplate(DynamicTextTemplate template)
Deprecated.
|
void |
addTemplate(FinalTextTemplate template)
Deprecated.
|
void |
addTemplate(org.apache.wicket.markup.html.IHeaderContributor template)
Add a generic template to the header response.
|
org.apache.wicket.markup.head.HeaderItem |
getHeaderItem()
Return a header item for the modules and references
|
void addModule(String module)
YahooNamespace
contextmodule
- YUI module namevoid addModule(org.onehippo.yui.YuiNamespace namespace, String module)
YuiNamespace
contextmodule
- YUI module namenamespace
- YuiNamespace
to use as context for modulevoid addTemplate(Class<?> clazz, String filename, Map<String,Object> parameters)
TextTemplate
to the response. The model provided by the parameters Map
is final.clazz
- Class that acts as contextfilename
- Name of file relative to provided classparameters
- Parameters that will be interpolated with the TextTemplate
@Deprecated void addTemplate(FinalTextTemplate template)
template
- TextTemplate
that will be added to the response.@Deprecated void addTemplate(DynamicTextTemplate template)
DynamicTextTemplate
to the response. The model will be refreshed upon every request.template
- DynamicTextTemplate
that will be added to the response.void addTemplate(org.apache.wicket.markup.html.IHeaderContributor template)
template
- void addOnWinLoad(String onload)
String
that will be executed on the browsers' window-load eventonload
- String
of javascript code that will be executed on the client.void addOnWinLoad(org.apache.wicket.model.IModel<String> model)
model
- IModel
which returns javascript code that will be executed on the client.void addOnDomLoad(String onload)
String
that will be executed on the browsers' dom-ready eventonload
- String
of javascript code that will be executed on the client.void addOnDomLoad(org.apache.wicket.model.IModel<String> model)
model
- IModel
which returns javascript code that will be executed on the client.void addJavascriptReference(org.apache.wicket.request.resource.ResourceReference reference)
reference
- ResourceReference
that should be added to the headvoid addCssReference(org.apache.wicket.request.resource.ResourceReference reference)
reference
- ResourceReference
that should be added to the headorg.apache.wicket.markup.head.HeaderItem getHeaderItem()
Copyright © 2007–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.