table setValue()

hi everbody,

I have a simple problem but still don’t know how to solve it, the examples couldn’t help me:
I want to select a row of a table (not by the user, the row should be selected if sth. happens). I tried to do it with:

table_1.setValue(table_1.getItem(1));

the code of the given example I’ve found

table_1.setValue(null);

works fine.

Therefore I think in my table_1.getItem(1) is sth. wrong.

Thx for your help and sorry for this simple question, I’m still a vaadin beginner. If there is another thread about this question (I am not looking for table_1.setValue(null) and table_1.setValue(table_1.getItemIds)) please let me know, I couldn’t find one via search.

Have a nice day and a good start in the week

Shame on me :*). Right after I posted my question I found the easy solution (funny how I tried it for 2 hours and find the solution right after creating the thread).

For everybody who is as blind as me:

table_1.select(1)

is everything you need.

Sorry everbody for disturbing you with my stupidness :grin:

That’s OK, we are all stupid from time to time :slight_smile: at least now someone might find this thread and avoid the mistake!