|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.Component org.apache.wicket.MarkupContainer org.apache.wicket.markup.html.WebMarkupContainer org.apache.wicket.markup.html.TransparentWebMarkupContainer org.apache.wicket.markup.html.internal.HtmlHeaderContainer
public class HtmlHeaderContainer
The HtmlHeaderContainer is automatically created and added to the component hierarchy by a HtmlHeaderResolver instance. HtmlHeaderContainer tries to handle/render the <head> tag and its body. However depending on the parent component, the behavior must be different. E.g. if parent component is a Page all components of the page's hierarchy must be asked if they have something to contribute to the <head> section of the html response. If yes, it must immediately be rendered.
<head> regions may contain additional wicket components, which can be added by means of add(Component) as usual.
<wicket:head> tags are handled by simple WebMarkupContainers also created by a HtmlHeaderResolver.
Nested Class Summary | |
---|---|
static class |
HtmlHeaderContainer.HeaderStreamState
Combines the MarkupStream with the open tag, together representing the header section
in the markup. |
Field Summary |
---|
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
HtmlHeaderContainer(String id)
Construct |
Method Summary | |
---|---|
IHeaderResponse |
getHeaderResponse()
Returns the header response. |
IMarkupFragment |
getMarkup()
Get the Markup associated with the Component. |
protected IHeaderResponse |
newHeaderResponse()
Factory method for creating header response |
boolean |
okToRenderComponent(String scope,
String id)
Check if the header component is ok to render within the scope given. |
void |
onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
First render the body of the component. |
protected void |
onDetach()
Called to allow a component to detach resources after use. |
void |
renderHeaderTagBody(HtmlHeaderContainer.HeaderStreamState headerStreamState)
Renders the content of the <head> section of the page, including <wicket:head> sections in subclasses of the page. |
protected boolean |
renderOpenAndCloseTags()
|
Methods inherited from class org.apache.wicket.markup.html.TransparentWebMarkupContainer |
---|
resolve |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getWebPage, getWebRequest, getWebResponse, getWebSession |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HtmlHeaderContainer(String id)
Component.Component(String)
Method Detail |
---|
public final void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
onComponentTagBody
in class MarkupContainer
markupStream
- The markup streamopenTag
- The open tag for the bodypublic void renderHeaderTagBody(HtmlHeaderContainer.HeaderStreamState headerStreamState)
IHeaderResponse
.
headerStreamState
- protected boolean renderOpenAndCloseTags()
public boolean okToRenderComponent(String scope, String id)
scope
- The scope of the header componentid
- The component's id
protected void onDetach()
Component
onDetach
in class Component
protected IHeaderResponse newHeaderResponse()
public IHeaderResponse getHeaderResponse()
public IMarkupFragment getMarkup()
Component
<span wicket:id="myPanel">body</span>
. You may use
Panel/Border/Enclosure.getMarkup(null) to return the associated markup file. And
Panel/Border/Enclosure.getMarkup(child) will search the child in the appropriate markup
fragment.
getMarkup
in class Component
MarkupContainer.getMarkup(Component)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |