Package org.apache.wicket
Class ClassAttributeModifier
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.AttributeModifier
-
- org.apache.wicket.behavior.AttributeAppender
-
- org.apache.wicket.ClassAttributeModifier
-
- All Implemented Interfaces:
Serializable
,IComponentAwareEventSink
,IComponentAwareHeaderContributor
,IClusterable
public abstract class ClassAttributeModifier extends AttributeAppender
An AttributeModifier specialized in managing the CSS class attribute- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.wicket.AttributeModifier
AttributeModifier.MarkerValue
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.AttributeModifier
VALUELESS_ATTRIBUTE_ADD, VALUELESS_ATTRIBUTE_REMOVE
-
-
Constructor Summary
Constructors Constructor Description ClassAttributeModifier()
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Serializable
newValue(String currentValue, String appendValue)
Gets the value that should replace the current attribute value.protected abstract Set<String>
update(Set<String> oldClasses)
Callback to update the CSS class values for a tag.-
Methods inherited from class org.apache.wicket.behavior.AttributeAppender
getSeparator, setSeparator, toString
-
Methods inherited from class org.apache.wicket.AttributeModifier
append, append, detach, getAttribute, getReplaceModel, onComponentTag, prepend, prepend, remove, replace, replace, replaceAttributeValue
-
Methods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, bind, canCallListener, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag, renderHead, unbind
-
-
-
-
Constructor Detail
-
ClassAttributeModifier
public ClassAttributeModifier()
Constructor.
-
-
Method Detail
-
newValue
protected Serializable newValue(String currentValue, String appendValue)
Description copied from class:AttributeModifier
Gets the value that should replace the current attribute value. This gives users the ultimate means to customize what will be used as the attribute value. For instance, you might decide to append the replacement value to the current instead of just replacing it as is Wicket's default.- Overrides:
newValue
in classAttributeAppender
- Parameters:
currentValue
- The current attribute value. This value might be null!appendValue
- The replacement value. This value might be null!- Returns:
- The value that should replace the current attribute value
-
-