|
||||||||||
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.markup.head.ResourceAggregator
public class ResourceAggregator
ResourceAggregator
implements resource dependencies, resource bundles and sorting of
resources. During the rendering of components, all HeaderItem
s are
recorded and processed at the end.
Nested Class Summary | |
---|---|
static class |
ResourceAggregator.RecordedHeaderItem
Contains information about an HeaderItem that must be rendered. |
static class |
ResourceAggregator.RecordedHeaderItemLocation
The location in which a HeaderItem is added, consisting of the component/behavior
that added the item, the index in the list for that component/behavior at which the item was
added and the index in the request. |
Constructor Summary | |
---|---|
ResourceAggregator(IHeaderResponse real)
Construct. |
Method Summary | |
---|---|
void |
close()
Mark Header rendering is completed and subsequent usage will be ignored. |
void |
markRendered(Object object)
Marks the given object as rendered. |
protected HeaderItem |
preserveCssDetails(CssReferenceHeaderItem item,
CssReferenceHeaderItem bundle)
Preserves the resource reference details for CSS resource replacements. |
protected HeaderItem |
preserveDetails(HeaderItem item,
HeaderItem bundle)
Preserves the resource reference details for resource replacements. |
void |
render(HeaderItem item)
Renders the given HeaderItem to the response if none of the
tokens of the item has been rendered before. |
boolean |
wasRendered(Object object)
Returns whether the given object has been marked as rendered. |
Methods inherited from class org.apache.wicket.markup.html.DecoratingHeaderResponse |
---|
getRealResponse, getResponse, isClosed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceAggregator(IHeaderResponse real)
real
- Method Detail |
---|
public void markRendered(Object object)
IHeaderResponse
markRendered
in interface IHeaderResponse
markRendered
in class DecoratingHeaderResponse
object
- object to be marked as rendered.public boolean wasRendered(Object object)
IHeaderResponse
renderJavaScriptReference
and renderCSSReference
mark
the specified ResourceReference
as rendered.
renderJavaScript
marks List of two elements (first is javascript body
CharSequence and second is id) as rendered.
renderString
marks the whole string as rendered.
markRendered
can be used to mark an arbitrary object as rendered
wasRendered
in interface IHeaderResponse
wasRendered
in class DecoratingHeaderResponse
object
- Object that is queried to be rendered
public void render(HeaderItem item)
IHeaderResponse
HeaderItem
to the response if none of the
tokens of the item has been rendered before.
render
in interface IHeaderResponse
render
in class DecoratingHeaderResponse
item
- The item to render.public void close()
IHeaderResponse
close
in interface Closeable
close
in interface IHeaderResponse
close
in class DecoratingHeaderResponse
protected HeaderItem preserveDetails(HeaderItem item, HeaderItem bundle)
WebApplication.addResourceReplacement(org.apache.wicket.request.resource.CssResourceReference, org.apache.wicket.request.resource.ResourceReference)
then the replacement will
will inherit the media attribute
item
- The replaced header itembundle
- The bundle that represents the replacement
protected HeaderItem preserveCssDetails(CssReferenceHeaderItem item, CssReferenceHeaderItem bundle)
WebApplication.addResourceReplacement(org.apache.wicket.request.resource.CssResourceReference, org.apache.wicket.request.resource.ResourceReference)
then the replacement will
will inherit the media attribute
item
- The replaced header itembundle
- The bundle that represents the replacement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |