Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Grid: show selected item value in a window

App Keto
6 years ago Jun 24, 2015 7:29am
Marius Reinwald
6 years ago Jun 24, 2015 8:05am
App Keto
6 years ago Jun 25, 2015 7:44am
Marius Reinwald
6 years ago Jun 25, 2015 12:40pm
App Keto
6 years ago Jul 29, 2015 8:00am
Marius Reinwald
6 years ago Jul 29, 2015 9:53am
App Keto
6 years ago Jul 29, 2015 12:53pm
Marius Reinwald
6 years ago Jul 29, 2015 1:57pm
App Keto
6 years ago Jul 31, 2015 8:45am
Marius Reinwald
6 years ago Jul 31, 2015 1:05pm
App Keto
6 years ago Aug 03, 2015 6:47am
Marius Reinwald
6 years ago Aug 03, 2015 7:49am
App Keto
6 years ago Aug 03, 2015 9:28am
Marius Reinwald
6 years ago Aug 03, 2015 9:47am

Yes. Your code doesn't work like this.
I'm not sure if I understood what you actually want to do. Just for clarification here is what I think you want. Then you can correct me if that's wrong.
You have a Window (ExampleWindow) which looks the same but has a Label which schould display different column Values.
You have a grid with several columns. One of them has a ButtonRenderer.
Now on click on the Button you want to display the Window with the Value of one of the other columns. (Really only one column? You also said something about displaying different columns? How do you know which one to display?)

If you have your Window constructor set like
public ExampleWindow(String colValue)
you can use new Label(colValue) instead

When creating the Window use
new ExampleWindow(myContainer.getItem(event.getItemId()).getBean().getExampleC()) or getExampleD or whatever the column value you want is.
 

App Keto
6 years ago Aug 03, 2015 10:15am
App Keto
6 years ago Aug 04, 2015 10:23am
Marius Reinwald
6 years ago Aug 04, 2015 1:07pm
App Keto
6 years ago Aug 04, 2015 1:34pm
Marius Reinwald
6 years ago Aug 04, 2015 2:06pm