Table.discard() does not revert displayed values

Hi,

there seems to be a problem with either a Table component or my understanding.

When I invoke table.commit() data gets propagated to the containers.

When I invoke table.discard() - data does not get propagated to the container, but the displayed values are not reverted back…

Based on the doco:


Discards all changes since last commit. The object updates its value from the data source.

It does not seem to be happening.


cancelButton.addListener(new Button.ClickListener() {

            public void buttonClick(ClickEvent event) {

                table.discard();
                table.requestRepaint();
               
            }
        });


What do I miss?
Vaadin 6.4.7

p.s. Great and fun framework btw!

Hi,

Table is a field which value is selection (practically item identifier(s) of container data source). For example Table can be used instead of a Select component. commit() and discard() methods work with this selection value and with Table’s property data source. They don’t affect possibly created fields inside the table (like in Form).

cheers,
matti