wicket.markup.html
Class BodyOnLoadContainer

java.lang.Object
  extended bywicket.Component
      extended bywicket.MarkupContainer
          extended bywicket.markup.html.WebMarkupContainer
              extended bywicket.markup.html.BodyOnLoadContainer
All Implemented Interfaces:
IAjaxListener, IComponentResolver, IHeaderContributor, IRequestListener, java.io.Serializable

public class BodyOnLoadContainer
extends WebMarkupContainer
implements IComponentResolver

Handle <body> tags. The reason why this is a component is because of JavaScript and CSS support which requires to append body onload attributes from child component markup to the page's body tag.

Author:
Juergen Donnerstag
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class wicket.Component
Component.ComponentModelChange, Component.IVisitor, Component.VisibilityChange
 
Field Summary
 
Fields inherited from class wicket.Component
FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4
 
Constructor Summary
BodyOnLoadContainer(java.lang.String id)
          Constructor used by BodyOnLoadContainer.
 
Method Summary
protected  void onComponentTag(ComponentTag tag)
          If parent is WebPage append onload attribute values from all components in the hierarchie with onload attribute in there own markup.
 boolean resolve(MarkupContainer container, MarkupStream markupStream, ComponentTag tag)
          BodyOnLoadContainer has been autoAdded, it has been injected similiar to an AOP interceptor.
 
Methods inherited from class wicket.markup.html.WebMarkupContainer
getMarkupType, onRender, renderHead
 
Methods inherited from class wicket.MarkupContainer
add, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, internalAdd, internalBeginRequest, internalEndRequest, iterator, iterator, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, toString, visitChildren, visitChildren
 
Methods inherited from class wicket.Component
add, add, addStateChange, checkComponentTag, checkComponentTagAttribute, debug, detachModel, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getAjaxHandlers, getApplication, getApplicationPages, getApplicationSettings, getClassRelativePath, getComparator, getConverter, getEscapeModelStrings, getFeedbackMessage, getFlag, getId, getLocale, getLocalizer, getModel, getModelObject, getModelObjectAsString, getPage, getPageFactory, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResource, getResponse, getSession, getString, getString, getString, getStyle, getVariation, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnBeginRequest, internalOnEndRequest, internalOnModelChanged, internalOnModelChanging, isAncestorOf, isVersioned, isVisible, isVisibleInHierarchy, modelChanged, modelChanging, newPage, newPage, onBeginRequest, onEndRequest, onModelChanged, onModelChanging, onRequest, onSessionAttach, redirectTo, remove, render, renderComponent, renderComponentTag, rendered, replaceComponentTagBody, sameRootModel, sameRootModel, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setModelObject, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisible, urlFor, urlFor, visitParents, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BodyOnLoadContainer

public BodyOnLoadContainer(java.lang.String id)
Constructor used by BodyOnLoadContainer. The id is fix "_body" and the markup stream will be provided by the parent component.

Parameters:
id - Componen id
Method Detail

onComponentTag

protected void onComponentTag(ComponentTag tag)
If parent is WebPage append onload attribute values from all components in the hierarchie with onload attribute in there own markup.

Overrides:
onComponentTag in class Component
Parameters:
tag - Tag to modify
See Also:
Component.onComponentTag(wicket.markup.ComponentTag)

resolve

public boolean resolve(MarkupContainer container,
                       MarkupStream markupStream,
                       ComponentTag tag)
BodyOnLoadContainer has been autoAdded, it has been injected similiar to an AOP interceptor. Thus BodyOnLoadContainer must forward any request to find a component based on an ID to its parent container.

Specified by:
resolve in interface IComponentResolver
Parameters:
container - The container parsing its markup
markupStream - The current markupStream
tag - The current component tag while parsing the markup
Returns:
True if component-id was handled by the resolver, false otherwise.
See Also:
IComponentResolver.resolve(wicket.MarkupContainer, wicket.markup.MarkupStream, wicket.markup.ComponentTag)


Copyright © 2004-2006 Wicket developers. All Rights Reserved.