用smartgwt做的,用TreeGrid显示数据,可以插入,不能修改和删除,怎么解决?
初学smartgwt,做了个树形读取数据,处理数据的例子。
只用了一个表,可以insert,但是不能update和delete。报错如下:
14:30:15.546 [ERROR] [test4] 14:30:15.546:XRP9:WARN:RPCManager:Error performing rpcRequest: error: TRANSPORT_ERROR, response: {status: -90,
data: Obj,
httpResponseCode: 413,
transactionNum: 1,
clientContext: Obj,
context: Obj,
startRow: 0,
endRow: 0,
totalRows: 0}
com.smartgwt.client.core.JsObject$SGWT_WARN: 14:30:15.546:XRP9:WARN:RPCManager:Error performing rpcRequest: error: TRANSPORT_ERROR, response: {status: -90,
data: Obj,
httpResponseCode: 413,
transactionNum: 1,
clientContext: Obj,
context: Obj,
startRow: 0,
endRow: 0,
totalRows: 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:157)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
我把TreeGrid换成ListGrid则增删改查都可以。我检查了,和showcase里面那些树形例子没有差别,只是单表,求高手帮忙。以下是部分代码:
final TreeGrid treeGrid = new TreeGrid();
treeGrid.setLoadDataOnDemand(false);
treeGrid.setWidth(800);
treeGrid.setHeight(300);
treeGrid.setDataSource(dataSource);
treeGrid.setAutoFetchData(true);
treeGrid.setCanFreezeFields(true);
treeGrid.setCanReparentNodes(true);
treeGrid.setCanEdit(true);
treeGrid.setSelectionType(SelectionStyle.SINGLE);
[解决办法]
我也遇到这问题了,一直没有找到办法解决了,你解决了吗?