Yet another newcomer question about Buffered interface and Table component

First of all, let me say that in case of all previous issues forum search was enough…but not with this one. So I need a little push :slight_smile:

I’m having big time issues trying to understand and use commit, discard, setReadOnly and setWriteThrough methods (I digged through relevant chapters in
Book of Vaadi
n and
Learning Vadin
, just to mention that).

Thing is that I’m using Table / Bean Container / extended DefaultFieldFactory stack combined with excellent Wizards for Vaadin add-on

Typically, I want to keep my data selected in table after I navigate back and forth wizard steps…unfortunately, It is not the case now (see snapshots below ).

Relevant parts of code:

Now, these are my thoghts:

  1. I must be doing something wrong with Buffered methods commit / discard / setReadOnly / setWriteThrough,

  2. Buffered interface can’t be used for this purposes, and I need to find different way to solve my issue (create some helper / memo class in order to hold data from table, etc).

Any help will be appreciated :smiley:

When setWriteThrough(true) has been called the changes are reflected to underlying data source without commit i.e. the field is in auto commit mode. Are you perhaps initializing your data source by accident or doing something else strange in WizardStep.getContent().

Are you by any chance instantiating the Table inside the
method? That would explain why it is always reset when you navigate back. Instead you should store a reference to the Table and always return the same instance from the

See for example the
from the demo application sources. The
instance variable is initialized the first time the
method is called and after that the same instance is always returned.

Exactly…It was so obvious, but I overlooked. Shame on me :*)

Mental note to myself: always try to put few breakpoints in Eclipse and debug
posting new thread to forum :what:

Thanks Teemu and Johannes !
Much appreciated !