Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Communication between client parts of components
Hello,
I have my 2 custom components e.g.
@ClientWidget(value = VComponent1.class)
public class Component1 {
}
and
@ClientWidget(value = VComponent2.class)
public class Component2 {
}
I would like to bind them on server side.
e.g.
Component2 cmp2 = new Component2();
Component1 cmp1 = new Component1();
cmp1.setDataSource(cmp2);
Question is that I don't know how to send bind infomation to VComponent1.
VComponent1 should have direct link to VComponent2
public class VComponent1 {
VComponent2 dataSource;
@Override
public void onClick(ClickEvent event) {
super.onClick(event);
String data = dataSource.getCurrentData();
client.updateVariable(uidlId, "curData", data, true);
}
}
I need to avoid communication through server part of Component2 because of some specific time issues.
VComponent1 should have direct access to VComponent2.
Could you please help me with my scenario.
Thanks,
Aritomo
Last updated on Apr, 10th 2012
You cannot reply to this thread.