Example usage for org.apache.wicket.markup.html.link Link getModel

List of usage examples for org.apache.wicket.markup.html.link Link getModel

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.link Link getModel.

Prototype

@SuppressWarnings("unchecked")
default IModel<T> getModel() 

Source Link

Document

Typesafe getter for the model

Usage

From source file:org.yes.cart.web.page.component.navigation.URLPagingNavigation.java

License:Apache License

@Override
protected void populateItem(final LoopItem loopItem) {
    super.populateItem(loopItem);

    Link pageLink = (Link) loopItem.get(0);
    IModel model = pageLink.getModel();

    if (model instanceof Model && model.getObject() instanceof Boolean) {
        loopItem.add(new AttributeModifier("class", "active"));
    }//  w w w  .  ja  va  2  s.c  om

}