|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IHeaderResponse
Interface that is used to render header elements (usually javascript and CSS references). Implementation of this interface is responsible for filtering duplicate contributions (so that for example the same javascript is not loaded twice) during the same request.
Method Summary | |
---|---|
void |
close()
Mark Header rendering is completed and subsequent usage will be ignored. |
Response |
getResponse()
Returns the response that can be used to write arbitrary text to the head section. |
boolean |
isClosed()
|
void |
markRendered(Object object)
Marks the given object as rendered. |
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. |
Method Detail |
---|
void render(HeaderItem item)
HeaderItem
to the response if none of the
tokens of the item has been rendered before.
item
- The item to render.void markRendered(Object object)
object
- object to be marked as rendered.boolean wasRendered(Object object)
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
object
- Object that is queried to be rendered
Response getResponse()
Note: This method is kind of dangerous as users are able to write to the output whatever they like.
void close()
close
in interface Closeable
boolean isClosed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |