Some sample code I used at a tech lunch @ Vaadin HQ