Hi,
I am trying to integrate a Javascript-library using a Javascript-Extension, but I cannot get it to work. In my connector I am basically doing the same as the
Book of Vaadin
says, but this.getElement() always returns null.
Connector:
window.de_tobiasdemuth_vaadin_MyExtension =
function() {
alert(this.getElement());
// Create the component
var ext = js.init(this.getElement());
// Handle changes from the server-side
this.onStateChange = function() {
// left out
};
};
Usage in UI:
@Override
protected void init(VaadinRequest request) {
final VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
setContent(layout);
final TextArea ta = new TextArea();
new MyExtension().extend(ta);
layout.addComponent(ta);
}
Does anybody have an idea what I am doing wrong here?
kind regards
Tobias