Example usage for org.apache.wicket Component getPageRelativePath

List of usage examples for org.apache.wicket Component getPageRelativePath

Introduction

In this page you can find the example usage for org.apache.wicket Component getPageRelativePath.

Prototype

@Override
public final String getPageRelativePath() 

Source Link

Document

Gets the path to this component relative to its containing page, i.e.

Usage

From source file:wicketbox.examples.ScrollExamplePage.java

License:Apache License

public ScrollExamplePage() {
    WebMarkupContainer scroll = new WebMarkupContainer("scroll");
    scroll.add(new Scroll(Orientation.VERTICAL, ".scroll") {
        @Override/*from  w ww .j a  v a  2 s .  c  om*/
        protected String getPersist(Component component) {
            return persistToCookie("scroll:" + component.getPageRelativePath(), Duration.days(1));
        }
    });
    add(scroll);

    scroll.add(new Label("left", new StringResourceModel("lorem", null)));
    scroll.add(new Label("right", new StringResourceModel("lorem", null)));
}