List of usage examples for com.vaadin.ui JavaScript addFunction
public void addFunction(String name, JavaScriptFunction function)
From source file:de.metas.procurement.webui.util.SwipeHelper.java
License:Open Source License
@SuppressWarnings("serial") private final void registerJavaScriptFunctionsIfNeeded() { if (jsFunctionsRegistered.getAndSet(true)) { return; // already registered }/* ww w . j a va 2 s . co m*/ final JavaScript javaScript = JavaScript.getCurrent(); javaScript.addFunction(JS_FUNC_OnSwipe, new JavaScriptFunction() { @Override public void call(final JsonArray arguments) { invokeOnSwipe(arguments); } }); }