Layout in Table : Let click go through

In my application I need to display large tables with complex layouts in some cells.

I was able to implement that by putting some CssLayouts inside the complex cells and do the layout myself.
Visualy it works very well but the layout is blocking the click. So if the user click on a normal cell, the row is selected, but if he clicks on a cell with a layout, the layout “eat” the click.

I tried removing all listeners from the layout in case there was some there by default, I added a listener to the layout and tried to make table.fireEvent(event) but it seems the selection event is done on the client side.

Is there a way to tell the layouts not to block the click ? Or can anybody think of a workaround ?

I found a way to solve partially my question. I have added a layout click listener on each of my layouts and I handle the selection manually like this :


        public void layoutClick(LayoutClickEvent event) {
                if (event.isCtrlKey()) {
                    @SuppressWarnings("unchecked")
                    Set<Object> selectedIds = (Set<Object>) table.getValue();

                    for (Object o : selectedIds) {
                        if (o.equals(id)) {
                            table.unselect(id);
                            return;
                        }
                    }
                    table.select(id);
                } else {
                    table.setValue(null);
                    table.select(id);
                }
        }

This does handle single click and CTRL+click but I couldn’t manage to handle SHIFT+click on a filtered table.

Anybody can think of a better way to do that ?