AttributeModifier « wicket « Java Enterprise Q&A

1. Wicket AttributeModifier for AjaxLink

In wicket AttributeModifier doesn't change attribute "class" for AjaxLink. It should change class attribute and change how link looks like.

public class TestPage extends WebPage {
    private AjaxLink link1;

2. How to remove previous attributeModifier when new attributeModifier is added?

I have two columns which are orderbyborder links. When i click one column i changed the color of column by adding attributeModifier in the following way

add(new AttributeModifier("style", true, new Model<String>("background-color:#80b6ed;")));
This works ...