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.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 6 days ago
Problem with Table generated column and ItemClickListener
I have a table which displays a list of users, this table has a generated column showing the group of each user and I added a listener (ItemClickListener) to the table.
The problem is :
the itemClick method id never called, but if I remove te generated colum, the method is called normally. Is this a know bug?
Can I use a listener in a table with generated columns?
Thanks in advance
Last updated on
I know this is a bit late. I believe you can just define a LayoutClickListener:
addGeneratedColumn("column", new ColumnGenerator() {
public Component generateCell(final Table source, final Object itemId, final Object columnId) {
HorizontalLayout layout = new HorizontalLayout();
// ... some other stuff like getting bean and adding components
layout.addListener(new LayoutClickListener(){
@Override
public void layoutClick(LayoutClickEvent event) {
source.select(itemId);
}
});
return layout;
}
Last updated on Jun, 26th 2012
You cannot reply to this thread.