wicket.markup.html
Class BodyContainer

java.lang.Object
  extended by wicket.markup.html.BodyContainer
All Implemented Interfaces:
java.io.Serializable

public final class BodyContainer
extends java.lang.Object
implements java.io.Serializable

This is not realy a Container component in the standard Wicket sense. It rather is a facade which allows to easily add attribute modifier to the MarkupContainer associated with <body>. That container might be a Wicket generated one (automatically) or one manually added by a user the standard Wicket way.

Container for the page body. This is mostly an internal class that is used for contributions to the body tag's onload event handler.

Author:
jcompagner TODO Post 1.2: Change the name. It is not derived from MarkupContainer
See Also:
Serialized Form

Nested Class Summary
static class BodyContainer.AppendingAttributeModifier
          Little helper
 
Constructor Summary
BodyContainer(WebPage page, java.lang.String id)
          Construct.
 
Method Summary
 BodyContainer addOnLoadModifier(IModel model)
          Deprecated. use addOnLoadModifier(IModel, Component) instead
 BodyContainer addOnLoadModifier(IModel model, Component behaviorOwner)
          Add a new AttributeModifier to the body container which appends the 'value' to the onLoad attribute of the body tag.
 BodyContainer addOnLoadModifier(java.lang.String value)
          Deprecated. use addOnLoadModifier(String, Component) instead
 BodyContainer addOnLoadModifier(java.lang.String value, Component behaviorOwner)
          Add a new AttributeModifier to the body container which appends the 'value' to the onLoad attribute of the body tag.
 BodyContainer addOnUnLoadModifier(IModel model)
          Deprecated. use addOnUnLoadModifier(IModel, Component) instead
 BodyContainer addOnUnLoadModifier(IModel model, Component behaviorOwner)
          Add a new AttributeModifier to the body container which appends the 'value' to the onUnLoad attribute of the body tag.
 BodyContainer addOnUnLoadModifier(java.lang.String value)
          Deprecated. use addOnUnLoadModifier(String, Component) instead
 BodyContainer addOnUnLoadModifier(java.lang.String value, Component behaviorOwner)
          Add a new AttributeModifier to the body container which appends the 'value' to the onUnLoad attribute of the body tag.
 WebMarkupContainer getBodyContainer()
          Get the real body container (WebMarkupContainer)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BodyContainer

public BodyContainer(WebPage page,
                     java.lang.String id)
Construct.

Parameters:
page - The webpage where the body container is in
id - The container id
Method Detail

addOnLoadModifier

public final BodyContainer addOnLoadModifier(java.lang.String value)
Deprecated. use addOnLoadModifier(String, Component) instead

Add a new AttributeModifier to the body container which appends the 'value' to the onLoad attribute of the body tag.

Note: This method is not suitable for

Parameters:
value - The value to append to 'onLoad'
Returns:
this

addOnLoadModifier

public final BodyContainer addOnLoadModifier(IModel model)
Deprecated. use addOnLoadModifier(IModel, Component) instead

Add a new AttributeModifier to the body container which appends the 'value' to the onLoad attribute of the body tag.

Parameters:
model - The model that holds the value that must be appended to 'onLoad'
Returns:
this

addOnUnLoadModifier

public final BodyContainer addOnUnLoadModifier(java.lang.String value)
Deprecated. use addOnUnLoadModifier(String, Component) instead

Add a new AttributeModifier to the body container which appends the 'value' to the onUnLoad attribute of the body tag.

Parameters:
value - The value to append to 'onUnLoad'
Returns:
this

addOnUnLoadModifier

public final BodyContainer addOnUnLoadModifier(IModel model)
Deprecated. use addOnUnLoadModifier(IModel, Component) instead

Add a new AttributeModifier to the body container which appends the value of the model to the onUnLoad attribute of the body tag.

Parameters:
model - The model which holds the value to be appended to 'onUnLoad'
Returns:
this

getBodyContainer

public WebMarkupContainer getBodyContainer()
Get the real body container (WebMarkupContainer)

Returns:
WebMarkupContainer associated with the <body> tag

addOnLoadModifier

public final BodyContainer addOnLoadModifier(java.lang.String value,
                                             Component behaviorOwner)
Add a new AttributeModifier to the body container which appends the 'value' to the onLoad attribute of the body tag. Remember the component which requested to add the modified to the body container. This for example is required in cases where on a dynamic page the Component (e.g. a Panel) gets removed and/or replaced and the body attribute modifier must be removed/replaced as well.

Parameters:
value - The value to append to 'onLoad'
behaviorOwner - The component which 'owns' the attribute modifier. Null is a allowed value.
Returns:
this

addOnLoadModifier

public final BodyContainer addOnLoadModifier(IModel model,
                                             Component behaviorOwner)
Add a new AttributeModifier to the body container which appends the 'value' to the onLoad attribute of the body tag. Remember the component which requested to add the modified to the body container. This for example is required in cases where on a dynamic page the Component (e.g. a Panel) gets removed and/or replaced and the body attribute modifier must be removed/replaced as well.

Parameters:
model - The model which holds the value to be appended to 'onLoad'
behaviorOwner - The component which 'owns' the attribute modifier. Null is a allowed value.
Returns:
this

addOnUnLoadModifier

public final BodyContainer addOnUnLoadModifier(java.lang.String value,
                                               Component behaviorOwner)
Add a new AttributeModifier to the body container which appends the 'value' to the onUnLoad attribute of the body tag. Remember the component which requested to add the modified to the body container. This for example is required in cases where on a dynamic page the Component (e.g. a Panel) gets removed and/or replaced and the body attribute modifier must be removed/replaced as well.

Parameters:
value - The value to append to 'onUnLoad'
behaviorOwner - The component which 'owns' the attribute modifier. Null is a allowed value.
Returns:
this

addOnUnLoadModifier

public final BodyContainer addOnUnLoadModifier(IModel model,
                                               Component behaviorOwner)
Add a new AttributeModifier to the body container which appends the 'value' to the onUnLoad attribute of the body tag. Remember the component which requested to add the modified to the body container. This for example is required in cases where on a dynamic page the Component (e.g. a Panel) gets removed and/or replaced and the body attribute modifier must be removed/replaced as well.

Parameters:
model - The model which holds the value to be appended to 'onUnLoad'
behaviorOwner - The component which 'owns' the attribute modifier. Null is a allowed value.
Returns:
this


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