Widget RPC: Traditionally Vaadin widgets use simple paint-change cycle to synchronize the client and server parts of a UI component.
Widget RPC introduces a new way of communicating using method calls in more RPC-like manner and enables developers to build more fine-grained communication more easily.
First, register a listeners:
rpc.register(“doStuffWithThings”, new Method() {
void invoke(String methodName, Object params)
// do stuff with things
}
});
Then you can invoke methods like this:
rpc.call(“doStuffWithThings”, aThing, anotherThing);
This works both ways (client to server and server to client). See the highlights and documentation for details.
…
Even this mechanism is in use in several of my components like the Console, SWFObject and YouTubePlayer, I consider it as “experimental” until I get some positive feedback and the users are comfortable with the API.
NOTE: For Vaadin 7 has its own very similar mechanism and this component is not needed.