Example usage for org.apache.wicket MarkupContainer getPageRelativePath

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

Introduction

In this page you can find the example usage for org.apache.wicket MarkupContainer 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:org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract.java

License:Apache License

private void setLastFocusHint() {

    final UiHintContainer entityModel = getPageUiHintContainerIfAny();
    if (entityModel == null) {
        return;/*from   w  ww  .ja v  a  2 s  .c  o m*/
    }
    MarkupContainer parent = this.parentPanel.getParent();
    if (parent != null) {
        entityModel.setHint(getPage(), PageAbstract.UIHINT_FOCUS, parent.getPageRelativePath());
    }
}

From source file:org.opensingular.lib.wicket.util.util.WicketUtils.java

License:Apache License

public static Optional<String> findContainerRelativePath(MarkupContainer container, String childId) {
    return WicketUtils.findFirstChild(container, Component.class, it -> it.getId().equals(childId))
            .map(it -> it.getPageRelativePath())
            .map(it -> it.substring(container.getPageRelativePath().length() + 1));
}