start server roundtrip from plain html, not component


I presume this is a quite difficult question to answer. Let me shortly post my scenario, so you can understand my needs. I create some floating elements in my application, and a type of them is generated via Velocity templates. It can be anything, for the generation relies upon the Velocity engine and a template.

The point is that for some elements where I display tables, I would like to enable navigation within the vaadin application, sending the server some information, process that info, and update the application state accordingly. The point is that since I have no vaadin component in the velocity template I cannot trigger it via a component, and must invent something to include it in the html or custom js, and fire it in the old html fashion, but trickering it for the vaadin servlet to understand and process.

My first approach is to artificially create an EVENT POST where I emulate a regular VAADIN server roundtrip to a previously registered component, but this approach has several obstacles, finding ids, csrftokens, etc… looks very complicated.

Anyone figures out a more straightforward approach?
Many thanks in advance for your time.


Carlos Conti.

Hi Carlos,

are you using a Navigator in your UI? Than you could simply add links to your HTML with a fragment identifier as href that will redirect the user to another navigation state.

For example:

<a href="#!account/settings">My Account Settings</a>

You can also use an AbstractJavaScriptComponent or AbstractJavaScriptExtension to add some javascript that can easily access the server via RPC (Remote Procedure Call)

Hi Max,

well that’s something… but unfortunately we are not using Navigator at all. Will considier your suggestion in parallel with the rest and post it afterwards.

Many thanks.



in the end we decided to implement a custom CustomLayout addon (Vaadin7 compatible ClickableCustomLayout), in order to read attributes of the template html and pass them to the server. Complicated at first but then the easiest way.

Thanks for your insights.