|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.behavior.AbstractBehavior org.apache.wicket.AttributeModifier org.apache.wicket.markup.html.body.BodyTagAttributeModifier
public final class BodyTagAttributeModifier
An attribute modifier specifically for body tags.
Panels have associated markup files and if they contain <wicket:head>
and
<body onLoad="...">
then the body's onLoad
attribute will be
appended to the page's onLoad attribute. That accretion happens by means of an AttributeModifier
which the Panel adds to the body container. In the case where the Panel is removed or replaced,
then the AttributeModifier must be removed or at least disabled. That exactly is what this
special purpose AttributeModifier does, i.e. it disables itself if the owner component (Panel) is
removed or replaced.
Field Summary |
---|
Fields inherited from class org.apache.wicket.AttributeModifier |
---|
VALUELESS_ATTRIBUTE_ADD, VALUELESS_ATTRIBUTE_REMOVE |
Constructor Summary | |
---|---|
BodyTagAttributeModifier(java.lang.String attribute,
boolean addAttributeIfNotPresent,
IModel replaceModel,
Component behaviorOwner)
Create a new attribute modifier with the given attribute name and model to replace with. |
|
BodyTagAttributeModifier(java.lang.String attribute,
IModel replaceModel,
Component behaviorOwner)
Create a new attribute modifier with the given attribute name and model to replace with. |
|
BodyTagAttributeModifier(java.lang.String attribute,
java.lang.String pattern,
boolean addAttributeIfNotPresent,
IModel replaceModel,
Component behaviorOwner)
Create a new attribute modifier with the given attribute name and expected pattern to match plus the model to replace with. |
|
BodyTagAttributeModifier(java.lang.String attribute,
java.lang.String pattern,
IModel replaceModel,
Component behaviorOwner)
Create a new attribute modifier with the given attribute name and expected pattern to match plus the model to replace with. |
Method Summary | |
---|---|
protected java.lang.String |
newValue(java.lang.String currentValue,
java.lang.String replacementValue)
Gets the value that should replace the current attribute value. |
Methods inherited from class org.apache.wicket.AttributeModifier |
---|
detach, getAddAttributeIfNotPresent, getAttribute, getContextRelativeValue, getPattern, getReplaceModel, isEnabled, isEnabled, onComponentTag, replaceAttibuteValue, replaceAttributeValue, setEnabled, toString |
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior |
---|
afterRender, beforeRender, bind, cleanup, detachModel, exception, getStatelessHint, isTemporary, onException, onRendered, rendered, renderHead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BodyTagAttributeModifier(java.lang.String attribute, boolean addAttributeIfNotPresent, IModel replaceModel, Component behaviorOwner)
attribute
- The attribute name to replace the value foraddAttributeIfNotPresent
- Whether to add the attribute if it is not presentreplaceModel
- The model to replace the value withbehaviorOwner
- The component which created (owns) the modifierpublic BodyTagAttributeModifier(java.lang.String attribute, IModel replaceModel, Component behaviorOwner)
attribute
- The attribute name to replace the value forreplaceModel
- The model to replace the value withbehaviorOwner
- The component which created (owns) the modifierpublic BodyTagAttributeModifier(java.lang.String attribute, java.lang.String pattern, boolean addAttributeIfNotPresent, IModel replaceModel, Component behaviorOwner)
attribute
- The attribute name to replace the value forpattern
- The pattern of the current attribute value to matchaddAttributeIfNotPresent
- Whether to add the attribute if it is not present and the replacement value is not
nullreplaceModel
- The model to replace the value withbehaviorOwner
- The component which created (owns) the modifierpublic BodyTagAttributeModifier(java.lang.String attribute, java.lang.String pattern, IModel replaceModel, Component behaviorOwner)
attribute
- The attribute name to replace the value forpattern
- The pattern of the current attribute value to matchreplaceModel
- The model to replace the value withbehaviorOwner
- The component which created (owns) the modifierMethod Detail |
---|
protected java.lang.String newValue(java.lang.String currentValue, java.lang.String replacementValue)
AttributeModifier
newValue
in class AttributeModifier
currentValue
- The current attribute value. This value might be null!replacementValue
- The replacement value. This value might be null!
AttributeModifier.newValue(java.lang.String, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |