I have a tab sheet that contains one tab. That tab contains a table. The table has a context menu. When the user right clicks on a row, the context menu appears with the single option (so far), “View.” When the user selects “View” I want to open a new, closeable tab and populate it with information based on the row that was selected. (I may also decide to drop the context menu and simply use a double-click on the row to open the new tab.)
It seems to me that the easiest way to do this would be to create a custom event for the “open new tab” click (or double click). The tab sheet can then listen for this event, take the ID from the selected row, open a new tab, and pass it the appropriate ID. I have searched through the Book of Vaadin and spent some time online looking for a tutorial on creating and capturing custom events in Vaadin, but with no success.
Questions:
Is this the best way to handle this? If not, how should I accomplish it?
If a custom event is the best method, does anyone have a link to a decent example, tutorial, blog post, or similar?
TIA
Chas.