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

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

Introduction

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

Prototype

public String getPopupJavaScript() 

Source Link

Document

Get the onClick javascript event handler.

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  www  .  j a  v  a2 s  . c  o  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());
    }
}