0

Vaadin 7

In my Vaadin app I want to call javascrtipt function onCustomName and pass param:

import com.vaadin.ui.UI;
String providerGUID = selectedProvider.getReference();
        UI.getCurrent().getPage().getJavaScript().execute("onCustomName(" + providerGUID + ")");

But nothing happened.

1 Answer 1

2

onCustomName is not a built in JavaScript API in the Browser, so I assume you are using some JavaScript library in your application. You need to import it in the Java class using @JavaScript annotation. You probably need to do the call in attach event instead of constructor to ensure that call happens after library has been imported.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.