gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.52k stars 374 forks source link

Cannot expand root node of CellTree if viewModel is empty #5968

Closed dankurka closed 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 5969

Found in GWT Release (e.g. 1.5.3, 1.6 RC):
2.1.1

Detailed description (please be as specific as possible):
From torgeir.veimo@gmail.com:
"With GWT-2.2-M1, if you expand the root node of a cellTree before the viewModel has
any data, it's impossible to expand the root node later. The onOpen() method of an
OpenHandler is called, but the node is not actually expanded."

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/d7a3f4951a8a2fed?hl=en#

Reported by jlabanca@google.com on 2011-02-02 15:16:11

dankurka commented 9 years ago

Reported by jlabanca@google.com on 2011-04-13 21:02:45

dankurka commented 9 years ago
Is this fixed somehow? I am running into this issue right now, GWT 2.4.

Workaround working for me:

    public void updateData(List<Mandator> mandators) {

        mandatorsDataProvider.getList().clear();

        // GWT ISSUE 
        if (mandators.size() == 0)
            mandatorsDataProvider.getList().add(null);
        else
            mandatorsDataProvider.getList().addAll(mandators);

    }

Reported by pgtaboada on 2012-04-24 14:09:18

dankurka commented 9 years ago

Reported by dankurka@google.com on 2013-06-03 12:43:37