Example usage for org.apache.wicket.markup.html.link PopupSettings setTarget

List of usage examples for org.apache.wicket.markup.html.link PopupSettings setTarget

Introduction

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

Prototype

public void setTarget(String target) 

Source Link

Document

Sets the target of the link.

Usage

From source file:org.hippoecm.frontend.service.popup.AjaxPopupService.java

License:Apache License

@Override
public void openPopupWindow(final PopupSettings popupSettings, final String url) {
    if (url == null) {
        return;/*from   w w  w .j  a v  a  2 s .  co m*/
    }
    AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
    if (target != null) {
        popupSettings.setTarget("'" + url + "'");

        StringBuffer javascript = new StringBuffer();
        javascript.append("(function() {");
        javascript.append(getPopupBlockerDetectionScript());
        javascript.append(popupSettings.getPopupJavaScript());
        javascript.append("})();");

        target.appendJavaScript(javascript.toString());
    }
}