|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.markup.html.DecoratingHeaderResponse org.apache.wicket.resource.dependencies.ResourceReferenceDependencyInjectingHeaderResponse
public class ResourceReferenceDependencyInjectingHeaderResponse
A header response that can be used by IHeaderResponseDecorator
to wrap another
IHeaderResponse. This response will take all references (js and css) and pass them to the
IResourceReferenceDependencyConfigurationService
to get the dependency tree populated.
After this, it will call through to the wrapped header response and render the tree in the
child-first dependency order so that all dependencies are guaranteed to be satisfied before this
reference is rendered.
Constructor Summary | |
---|---|
ResourceReferenceDependencyInjectingHeaderResponse(IHeaderResponse decorated)
If you call this constructor, you MUST override getConfigurationService(). |
|
ResourceReferenceDependencyInjectingHeaderResponse(IHeaderResponse decorated,
IResourceReferenceDependencyConfigurationService configurator)
Construct this header response with a configuration service that will be used to find dependencies. |
Method Summary | |
---|---|
IResourceReferenceDependencyConfigurationService |
getConfigurationService()
If you did not supply a non-null configuration service in the constructor, you must override this to return a configuration service to be used by this response. |
protected void |
render(AbstractResourceDependentResourceReference parent)
The method responsible for rendering the resource references. |
void |
renderCSSReference(ResourceReference reference)
Writes a CSS reference, if the specified reference hasn't been rendered yet. |
void |
renderCSSReference(ResourceReference reference,
String media)
Writes a CSS reference, if the specified reference hasn't been rendered yet. |
void |
renderJavaScriptReference(ResourceReference reference)
Writes a javascript reference, if the specified reference hasn't been rendered yet. |
void |
renderJavaScriptReference(ResourceReference reference,
String id)
Writes a javascript reference, if the specified reference hasn't been rendered yet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceReferenceDependencyInjectingHeaderResponse(IHeaderResponse decorated)
decorated
- the response you are decoratingpublic ResourceReferenceDependencyInjectingHeaderResponse(IHeaderResponse decorated, IResourceReferenceDependencyConfigurationService configurator)
decorated
- the response you are decoratingconfigurator
- the configuration serviceMethod Detail |
---|
public IResourceReferenceDependencyConfigurationService getConfigurationService()
public void renderCSSReference(ResourceReference reference)
IHeaderResponse
renderCSSReference
in interface IHeaderResponse
renderCSSReference
in class DecoratingHeaderResponse
reference
- resource reference pointing to the CSS resourcepublic void renderCSSReference(ResourceReference reference, String media)
IHeaderResponse
renderCSSReference
in interface IHeaderResponse
renderCSSReference
in class DecoratingHeaderResponse
reference
- resource reference pointing to the CSS resourcemedia
- the media type for this CSS ("print", "screen", etc.)public void renderJavaScriptReference(ResourceReference reference)
IHeaderResponse
renderJavaScriptReference
in interface IHeaderResponse
renderJavaScriptReference
in class DecoratingHeaderResponse
reference
- resource reference pointing to the javascript resourcepublic void renderJavaScriptReference(ResourceReference reference, String id)
IHeaderResponse
renderJavaScriptReference
in interface IHeaderResponse
renderJavaScriptReference
in class DecoratingHeaderResponse
reference
- resource reference pointing to the javascript resourceid
- id that will be used to filter duplicate reference (it's still filtered by URL
too)protected void render(AbstractResourceDependentResourceReference parent)
parent
- the reference that needs itself and all dependencies to be rendered
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |