View Full Version : [FNR] Regression: screen not correctly updated after removing a TreeTables store

Jose Jeria
13 May 2009, 7:33 AM
Latest GXT 1.2.4 from Subversion
Windows XP
Both hosted and web mode
Java 1.6I have a TreeTable that I load using RCP. I sometimes want to clear the Tree but this fails with the latest 1.2.x release. This works fine in 1.2.3, so I assume that it is a regression.

I call the removeAll() method on the trees store to achieve this. I verified that the store is empty after calling this method, so it seems to be a refresh issue.

No errors in console. I noticed that this works fine in the TreeTable demo, so it must be in combination with something else. Will try to create a testcase.

Note that this fails in both IE and Firefox.

Jose Jeria
13 May 2009, 11:33 PM
This is a testcase that works with 1.2.3 and fails with the latest 1.2.4 release (grabbed it from SVN):

package de.o2.bic.dwsoda.client.dialog;

import java.util.ArrayList;
import java.util.List;

import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
import com.extjs.gxt.ui.client.binder.TreeTableBinder;
import com.extjs.gxt.ui.client.data.BaseTreeLoader;
import com.extjs.gxt.ui.client.data.RpcProxy;
import com.extjs.gxt.ui.client.data.TreeLoader;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.store.TreeStore;
import com.extjs.gxt.ui.client.widget.Dialog;
import com.extjs.gxt.ui.client.widget.treetable.TreeTable;
import com.extjs.gxt.ui.client.widget.treetable.TreeTableColumn;
import com.extjs.gxt.ui.client.widget.treetable.TreeTableColumnModel;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.rpc.AsyncCallback;

import com.example.client.model.FileModel;
import com.example.client.model.FolderModel;
import com.example.client.rpc.FileService;
import com.example.rpc.FileServiceAsync;

public class BugDemo extends Dialog {
/**Tree store*/
TreeStore<FileModel> store;

public BugDemo() {

protected void onRender(Element parent, int pos) {
super.onRender(parent, pos);

final FileServiceAsync service = FileService.Util.getInstance();

TreeTableColumnModel columnModel = new TreeTableColumnModel(this.createColumns());

TreeTable treeTable = new TreeTable(columnModel);
treeTable.setSize("100%", "100%");

// data proxy
RpcProxy<FileModel, List<FileModel>> proxy = new RpcProxy<FileModel, List<FileModel>>() {
protected void load(FileModel loadConfig, AsyncCallback<List<FileModel>> callback) {
service.getFolderChildren(loadConfig, callback);

// tree loader
TreeLoader<FileModel> loader = new BaseTreeLoader<FileModel>(proxy) {
public boolean hasChildren(FileModel parent) {
return parent instanceof FolderModel;

// tree store
this.store = new TreeStore<FileModel>(loader);

TreeTableBinder<FileModel> binder = new TreeTableBinder<FileModel>(treeTable, this.store);



this.okBtn.setText("Click me to clear store");
this.okBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {

public void componentSelected(ButtonEvent ce) {


private List<TreeTableColumn> createColumns() {
List<TreeTableColumn> columns = new ArrayList<TreeTableColumn>();

TreeTableColumn column = new TreeTableColumn("name", "Name", 350);

column = new TreeTableColumn("revisionNumber", "Revision", 65);

column = new TreeTableColumn("author", "Author", 120);

column = new TreeTableColumn("date", "Date", 120);

return columns;
I guess that the same back-end can be used here as for the TreeTable demo in the Explorer.

Jose Jeria
19 May 2009, 7:19 AM
Has this issue been confirmed? Would be great to get some feedback on this issue.

Thank you.

19 May 2009, 7:27 AM
Fixed in SVN.

19 May 2009, 7:27 AM
If you report issues for SVN versions please dont use versionnumbers. It is better to say the revisionnumber.