java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.AttributeModifier
de.agilecoders.wicket.core.markup.html.bootstrap.behavior.CssClassNameModifier
All Implemented Interfaces:
Serializable, IComponentAwareEventSink, IComponentAwareHeaderContributor, IClusterable

public class CssClassNameModifier extends AttributeModifier
#### Description A CssClassNameModifier replaces an existing value with the given value. #### Usage

     <span class="className" wicket:id="foo"></span>
 
can be modified with these CssClassNameAppender: ```java link.add(new CssClassNameModifier("className1")); link.add(new CssClassNameModifier(Arrays.asList("className2", "className3"))); ``` this will result in the following markup: ```html <span class="className2 className3" wicket:id="foo"></span> ```
See Also:
  • Constructor Details

    • CssClassNameModifier

      public CssClassNameModifier(IModel<String> appendModel)
      Creates an AttributeModifier that appends the appendModel's value to the current value of the class attribute, and will add the attribute when it is not there already.
      Parameters:
      appendModel - the model supplying a single value to append
    • CssClassNameModifier

      public CssClassNameModifier(String... appendValue)
      Constructor.
      Parameters:
      appendValue - one or more values to append
    • CssClassNameModifier

      public CssClassNameModifier(List<String> appendValueList)
      Constructor.
      Parameters:
      appendValueList - a list of values to append
    • CssClassNameModifier

      public CssClassNameModifier(ICssClassNameProvider cssClassNameProvider)
      Constructor.
      Parameters:
      cssClassNameProvider - a css class name provider