Click on a Table row and get the value of a clomun

Hi every body!
I’m completely new to Java and Vaadin world, so please bear with me for a while!

I am writing the UI for a web-application. In one particular frame I have to handle a message client. As I didn’t know how to do it properly in Java/Vaadin, I decided to devide the screen (via Split Panels) to 4 sections line this:

table with message | replyTextArea, sendButton, toTextField for replying the selected message

messageTextArea | info related to the sender

I don’t know if this is a standard solution but …anyway!
Now I assume that there are some rows (messages) in the table. I would like to click on a single row and get each and every single vale of it.
Let’s say the table has follwoing columns: sender | message text | Prio

Additionally, I would like to show the sender in toTextField (for Replying) and the message text in the messageTextArea.

Can some body please show me what code I need for this reason? Or anybody can refere to me an existing code for handling a message client in Vaadin?
Please don’t speak too much Javaish, as I’m very new to this country :wink:



Quite near to the address-book demo application.
Have a look at :
… but you’ll have to dig into java :wink:


Ja, it seems to me that it’s kind of the thing which I am aiming for. But I honestly don’t understand the connections between all parts of it.
What part should I add to my please and how?


I meant

Hey Jan,

If you check the link that Sebastien mentioned, you’ll see that it utilises data binding.

contactList.addValueChangeListener(new Property.ValueChangeListener() {
  public void valueChange(ValueChangeEvent event) {
    Object contactId = contactList.getValue();
    if (contactId != null)
      editorLayout.setVisible(contactId != null);

You’ll have to dig a little deeper to understand how binding works, but hopefully this will help: