SmartGwt错误与树

SmartGwt错误与树,gwt,smartgwt,Gwt,Smartgwt,当我使用smartgwt 2.2时,smartgwt工作正常,但当我使用smartgwt 4.0b(夜间构建)时,我遇到了问题,错误如下: 00:00:48,253 [ERROR] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (null) @com.smartgwt.client.widgets.tree.Tree::create()([]): null at com.google.gw

当我使用smartgwt 2.2时,smartgwt工作正常,但当我使用smartgwt 4.0b(夜间构建)时,我遇到了问题,错误如下:

00:00:48,253 [ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (null) @com.smartgwt.client.widgets.tree.Tree::create()([]): null   at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)  at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)   at com.smartgwt.client.widgets.tree.Tree.create(Tree.java)  at com.smartgwt.client.core.BaseClass.getOrCreateJsObj(BaseClass.java:120)  at com.smartgwt.client.widgets.tree.TreeGrid.setData(TreeGrid.java:2393)    at pl.fizzycomp.departments.gwt.client.DepartmentsMainView.setModelData(DepartmentsMainView.java:175)   at com.test.departments.gwt.client.DepartmentsMainPresenter.setDepartments(DepartmentsMainPresenter.java:208)   at com.test.gwt.client.DepartmentsApp$2.onSuccess(DepartmentsApp.java:80)   at com.test.gwt.client.DepartmentsApp$2.onSuccess(DepartmentsApp.java:1)
我不知道怎么了这是我在DepartmentsMainView中的代码:

tree = new Tree();
tree.setModelType(TreeModelType.PARENT);
tree.setNameProperty(DepartmentTreeNode.NAME_FIELD);
tree.setParentIdField(DepartmentTreeNode.PARENT_ID_FIELD);
tree.setIdField(DepartmentTreeNode.ID_FIELD);


tree.setData(nodes.toArray(new DepartmentTreeNode[nodes.size()]));          

grid.setData(tree);
还有我的部门Treenode:

public class DepartmentTreeNode extends TreeNode implements IDepartmentTreeNode {
    public static final String ID_FIELD = "idField";
    public static final String NAME_FIELD = "nameField";
    public static final String CODE_FIELD = "codeField";
    public static final String DESCRIPTION_FIELD = "descriptionField";
    public static final String PARENT_ID_FIELD = "parentId";
    public static final String VERSION_FIELD = "versionField";

    public DepartmentTreeNode(DepartmentDto dto) {
        setTitle(dto.getName());

        setAttribute(ID_FIELD, dto.getId());
        setAttribute(PARENT_ID_FIELD, dto.getParentId());
        setDepartmentName(dto.getName());
        setAttribute(CODE_FIELD, dto.getCode());
        setAttribute(DESCRIPTION_FIELD, dto.getDescription());
        setAttribute(VERSION_FIELD, dto.getVersion());
    }
看起来一切都很好,我正在检查sysout的对象DepartmentTreeNode,这很好。那怎么了


在smart gwt控制台资源中,我只得到以下信息:

16:03:28.801:INFO:Log:initialized
16:03:28.848:WARN:Log:NOTE: Firebug is enabled. Firebug greatly slows the performance of applications that make heavy use of JavaScript. Isomorphic highly recommends Firebug for troubleshooting, but Firebug and other development tools should be disabled when assessing the real-world performance of SmartClient applications.
16:03:31.717:WARN:Log:New Class ID: 'DataView' collides with ID of existing object with value 'function DataView() {
    [native code]
}'.  Existing object will be replaced.
This conflict would be avoided by disabling ISC Simple Names mode.  See documentation for further information.
16:03:32.782:INFO:Log:isc.Page is loaded

我也清理我的项目mvn清理安装,我不认为这是夜间构建的问题。因为如果我使用的是smartgwt2.5,我会遇到以下错误:/

夜间构建错误实际上属于SmartGWT论坛。这很可能是一个bug

另外,您应该确保项目中没有旧的生成代码。可以肯定的是,删除war目录中所有旧生成的代码

最后,使用SmartGWT控制台:-它有时会使这些隐秘的错误更加清楚