Hi all,
As mentioned in previous post, I'm trying to upload data from a CSV file from our main grid to a CSV file, let the user make changes to it, and reupload the data.
I'm trying with BatchUploader and I'm following the sample in the showcase.
I have a window with the following method:
The datasource comes from our main grid and it's a dynamic one.
"uploader" is a servlet that will handle the POST.
I have an exception as soon as I call the method to open the window. Here is the log:
=== 2014-01-16 16:59:00,389 [l0-6] WARN RequestContext - dsRequest.execute() failed:
java.lang.Exception: Can't find dataSource: batchUpload - please make sure that you have a batchUpload.ds.xml file for it in [webRoot]/shared/ds
at com.isomorphic.application.AppBase.executeDefaultD SOperation(AppBase.java:672)
at com.isomorphic.application.AppBase.executeAppOpera tion(AppBase.java:658)
at com.isomorphic.application.AppBase.execute(AppBase .java:491)
at com.isomorphic.datasource.DSRequest.execute(DSRequ est.java:2412)
at com.isomorphic.servlet.IDACall.handleDSRequest(IDA Call.java:215)
at com.isomorphic.servlet.IDACall.processRPCTransacti on(IDACall.java:172)
at com.isomorphic.servlet.IDACall.processRequest(IDAC all.java:137)
at com.isomorphic.servlet.IDACall.doPost(IDACall.java :73)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
at com.isomorphic.servlet.BaseServlet.service(BaseSer vlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1097)
at com.dotomi.zisa.servlets.GWTCacheControlFilter.doF ilter(GWTCacheControlFilter.java:40)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1088)
at com.isomorphic.servlet.CompressionFilter.doFilter( CompressionFilter.java:259)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1088)
at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle (RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.co ntent(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run (QueuedThreadPool.java:488)
=== 2014-01-16 16:59:00,391 [l0-6] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
=== 2014-01-16 16:59:00,392 [l0-6] INFO Compression - /zisa/sc/IDACall: 244 -> 195 bytes
as soon as I choose a file and hit Upload button, I get this additional message in the log:
Uncaught JavaScript exception [TypeError: this.getDataSource(...).$708 is not a function] in http://vpaternostro-lux.dotomi.com:8888/zisa/sc/modules/ISC_DataBinding.js, line 1594
When throwing the exception, Firebug shows:
_transaction <transaction xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:type="xsd:Object"><transactionNum xsi:type="xsd:long">5</transactionNum><operations xsi:type="xsd:List"><elem xsi:type="xsd:Object"><appID>builtinApplication</appID><operation>batchUpload_loadSchema</operation><values xsi:type="xsd:Object"></values></elem></operations></transaction>
isc_tnum 5
protocolVersion 1.0
Source
isc_tnum=5&_transaction=%3Ctransaction%20xmlns%3Ax si%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLS chema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3 CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E 5%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype %3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xs d%3AObject%22%3E%3CappID%3EbuiltinApplication%3C%2 FappID%3E%3Coperation%3EbatchUpload_loadSchema%3C% 2Foperation%3E%3Cvalues%20xsi%3Atype%3D%22xsd%3AOb ject%22%3E%3C%2Fvalues%3E%3C%2Felem%3E%3C%2Foperat ions%3E%3C%2Ftransaction%3E&protocolVersion=1.0
When clicking on Upload nothing happens in Firebug
Thanks in advance.
Vittorio
=========== ENVIRONMENT DETAILS ===========
smartgwt.version:4.1.d20130712
SmartClient Version: SNAPSHOT_v9.1d_2013-07-12/PowerEdition Deployment (built 2013-07-12)
Firefox 25.0
As mentioned in previous post, I'm trying to upload data from a CSV file from our main grid to a CSV file, let the user make changes to it, and reupload the data.
I'm trying with BatchUploader and I'm following the sample in the showcase.
I have a window with the following method:
Code:
private void open() {
for (Canvas member : getMembers()) {
removeMember(member);
}
DataSource dataSource = MainPanel.getGrid().getDataSource();
batchUploader = new BatchUploader();
batchUploader.setWidth(500);
batchUploader.setUploadDataSource(dataSource);
batchUploader.setDataURL(GWT.getModuleBaseURL() + "/uploader");
VLayout layout = new VLayout(15);
layout.addMember(batchUploader);
addMember(layout);
show();
}
"uploader" is a servlet that will handle the POST.
I have an exception as soon as I call the method to open the window. Here is the log:
=== 2014-01-16 16:59:00,389 [l0-6] WARN RequestContext - dsRequest.execute() failed:
java.lang.Exception: Can't find dataSource: batchUpload - please make sure that you have a batchUpload.ds.xml file for it in [webRoot]/shared/ds
at com.isomorphic.application.AppBase.executeDefaultD SOperation(AppBase.java:672)
at com.isomorphic.application.AppBase.executeAppOpera tion(AppBase.java:658)
at com.isomorphic.application.AppBase.execute(AppBase .java:491)
at com.isomorphic.datasource.DSRequest.execute(DSRequ est.java:2412)
at com.isomorphic.servlet.IDACall.handleDSRequest(IDA Call.java:215)
at com.isomorphic.servlet.IDACall.processRPCTransacti on(IDACall.java:172)
at com.isomorphic.servlet.IDACall.processRequest(IDAC all.java:137)
at com.isomorphic.servlet.IDACall.doPost(IDACall.java :73)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
at com.isomorphic.servlet.BaseServlet.service(BaseSer vlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1097)
at com.dotomi.zisa.servlets.GWTCacheControlFilter.doF ilter(GWTCacheControlFilter.java:40)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1088)
at com.isomorphic.servlet.CompressionFilter.doFilter( CompressionFilter.java:259)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1088)
at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle (RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.co ntent(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run (QueuedThreadPool.java:488)
=== 2014-01-16 16:59:00,391 [l0-6] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
=== 2014-01-16 16:59:00,392 [l0-6] INFO Compression - /zisa/sc/IDACall: 244 -> 195 bytes
as soon as I choose a file and hit Upload button, I get this additional message in the log:
Uncaught JavaScript exception [TypeError: this.getDataSource(...).$708 is not a function] in http://vpaternostro-lux.dotomi.com:8888/zisa/sc/modules/ISC_DataBinding.js, line 1594
When throwing the exception, Firebug shows:
_transaction <transaction xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:type="xsd:Object"><transactionNum xsi:type="xsd:long">5</transactionNum><operations xsi:type="xsd:List"><elem xsi:type="xsd:Object"><appID>builtinApplication</appID><operation>batchUpload_loadSchema</operation><values xsi:type="xsd:Object"></values></elem></operations></transaction>
isc_tnum 5
protocolVersion 1.0
Source
isc_tnum=5&_transaction=%3Ctransaction%20xmlns%3Ax si%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLS chema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3 CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E 5%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype %3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xs d%3AObject%22%3E%3CappID%3EbuiltinApplication%3C%2 FappID%3E%3Coperation%3EbatchUpload_loadSchema%3C% 2Foperation%3E%3Cvalues%20xsi%3Atype%3D%22xsd%3AOb ject%22%3E%3C%2Fvalues%3E%3C%2Felem%3E%3C%2Foperat ions%3E%3C%2Ftransaction%3E&protocolVersion=1.0
When clicking on Upload nothing happens in Firebug
Thanks in advance.
Vittorio
=========== ENVIRONMENT DETAILS ===========
smartgwt.version:4.1.d20130712
SmartClient Version: SNAPSHOT_v9.1d_2013-07-12/PowerEdition Deployment (built 2013-07-12)
Firefox 25.0