PDA

View Full Version : [FIXED] [2.0-RC1] exeption in non-hosted mode treePanel.setChecked() pre-render



Cputerace
26 Jun 2009, 10:33 AM
package com.mycompany.gwtprototype.client;

import com.extjs.gxt.ui.client.data.BaseModelData;
import com.extjs.gxt.ui.client.data.BaseTreeModel;
import com.extjs.gxt.ui.client.store.TreeStore;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.treepanel.TreePanel;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class GwtPrototype implements EntryPoint {

private Viewport v = new Viewport();
private TreeStore<BaseModelData> ts;
private TreePanel<BaseModelData> tp;

public void onModuleLoad() {
RootPanel.get().add(v);
v.setHeight("100%");
v.setLayout(new FitLayout());
ts = new TreeStore<BaseModelData>();
tp = new TreePanel<BaseModelData>(ts);
tp.setCheckable(true);
tp.setDisplayProperty("name");
BaseTreeModel btm = new BaseTreeModel();
btm.set("name", "my name");
ts.add(btm, true);
tp.setChecked(btm, true);
v.add(tp);
v.layout();
}
}

Works fine in hosted mode but throws an exception in firefox/IE.

The firefox stack trace seems to point to:
TreePanel.setChecked()(line 639)->
TreePanelView.getCheckElement()(line 64)->
TreePanelView.getElementContainer()(line 83)->
node.getElement() returns null

sven
29 Jun 2009, 12:52 PM
Fixed in SVN

Cputerace
29 Jun 2009, 12:57 PM
Thanks.

I know it was said in the RC1 announcement that it is the last release before official 2.0, but will there be an RC2 to test all these fixes to RC1? IMHO RC2 would be very beneficial before full release.