在Listgrid(smartGWT)中设置值

在Listgrid(smartGWT)中设置值,gwt,smartgwt,gwt2,listgrid,Gwt,Smartgwt,Gwt2,Listgrid,我正在尝试使用智能Gwt,Listgrid 我同时使用com.google.gwt.user.client.ui和smart gwt。 我在ListGridRecords[]记录中有值。 我无法设置表中的值。 这段代码是复合的 public TableDocument(Action action) { initWidget(getTablePanel()); } private HorizontalPanel getTablePanel() { if (

我正在尝试使用智能Gwt,Listgrid

我同时使用com.google.gwt.user.client.ui和smart gwt。 我在ListGridRecords[]记录中有值。

我无法设置表中的值。

这段代码是复合的

public TableDocument(Action action) {
        initWidget(getTablePanel());
    }

private HorizontalPanel getTablePanel() {
        if (tablePanel == null) {
            tablePanel = new HorizontalPanel();
            tablePanel.setSize("144px", "75px");

            addtable();
        }

public void addtable() {
        // TODO Auto-generated method stub
        if(isDocumentPresent()==false){

            tablePanel.add(getNoDocumentLabel());
        }else{
            tablePanel.remove(noDocumentLabel);
            tablePanel.add(getDocumentTable()); <-- Error

        }
    }
private ListGrid getDocumentTable() {
        if (documentTable == null) {
            documentTable = new ListGrid();
            documentTable.setSize("644px", "379px");
            documentTable.setCanResizeFields(true);

            documentTable.setFields(getStatus(),getIcon(),getName(),getSize(),getModifiedby(),getModifiedDate(),getMajorVersiosn());
            addValuesToTable();
        }
        return documentTable;
    }

public ListGridField getStatus() {
        if (status == null) {
            status = new ListGridField("statusIcon","");
        }
        return status;
    }
public ListGridField getIcon() {
        if (icon == null) {
            icon = new ListGridField("documentIcon","");
        }
        return icon;
    }
.
.
.// similar code for getSize(),getModifiedby(),getModifiedDate(),getMajorVersiosn()

private void addValuesToTable() {
documentTable.setData(documentsArray);//documentarray is records
}


----------
error

    com.smartgwt.client.core.JsObject$SGWT_WARN: 12:15:47.778:WARN:ListGrid:isc_ListGrid_0:Unable to find clipHandle for drawn Canvas, elementId: isc_0
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.smartgwt.client.widgets.grid.ListGrid.create(ListGrid.java)
        at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:361)
        at com.smartgwt.client.widgets.BaseWidget.getElement(BaseWidget.java:276)
        at com.smartgwt.client.widgets.BaseWidget.getElement(BaseWidget.java:264)
        at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:94)
        at com.google.gwt.user.client.ui.HorizontalPanel.add(HorizontalPanel.java:49)
        at com.client.SmartGuI.TableDocument.addtable(TableDocument.java:158)
        at com.client.GUI.TreeCmis$2.onSuccess(TreeCmis.java:157)
        at com.client.GUI.TreeCmis$2.onSuccess(TreeCmis.java:1)
        at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
        at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
        at 
公共表格文档(操作){
initWidget(getTablePanel());
}
私有HorizontalPanel getTablePanel(){
如果(tablePanel==null){
tablePanel=新水平面板();
tablePanel.setSize(“144px”、“75px”);
addtable();
}
公共void addtable(){
//TODO自动生成的方法存根
如果(isDocumentPresent()==false){
tablePanel.add(getNodeDocumentLabel());
}否则{
tablePanel.移除(noDocumentLabel);

tablePanel.add(getDocumentTable());我建议不要混合使用GWT UI和SmartGWT。试着只使用SmartGWT,看看问题是否消失

您可以从用HLayout(SmartGWT)替换HorizontalLayout(我想是GWT)开始

引自:

Smart GWT具有互操作性支持,允许使用Smart GWT小部件 添加到GWT容器并允许将GWT小部件添加到 一个智能GWT容器,可用于:

  • 增量迁移到Smart GWT,例如引入单一、复杂的Smart GWT 现有GWT应用程序的日历或CubeGrid等组件

  • 在Smart GWT中使用复杂的第三方GWT小部件,而Smart GWT没有 相应的内置功能

但是,将Smart GWT和GWT自由混合使用是没有意义的 (或其他)组件,例如,您不应该放置GWT 智能GWT容器中的小部件,反过来又位于GWT中 容器。一般来说,除非需要 功能强制您执行

原因是存在最大程度的限制 两个Ajax小部件工具包(包括GWT)可以互操作——有 没有允许在管理领域互操作的标准 选项卡顺序,zIndex管理,像素完美布局,第508节 无障碍性和多层次模式

请注意,混合使用GWT和Smart GWT时会报告“bug” 不适当地(即,与这些指南相矛盾)是 通常会标记为WONTFIX,尽管我们将在 如果核心GWT开始支持API,那么未来将允许更好的 互操作性


我想你已经试着把SmartGWT和普通GWT混合起来了。@HardikMishra:我需要帮助。请帮个忙