Good day,
I have updated from SmartClient 10 power edition to SmartClient_v130p_2022-10-26_PowerEdition and now exporting a list grid is not working. Below is the code for the list grid, the button used for the export and the exception that is thrown on the server. I have found that when I reduce the number of columns that list grid has and don't have to scroll to the side, then the export works. But if there are columns are not visible without scrolling, then an excel document is downloaded but it only contains the list grid headers of the visible columns, the non visible columns(the ones you cannot see without scrolling to the side) and the data(rows) are not present. Can someone please tell me what am doing wrong. I am using tomcat 8
ListGrid
isc.ListGrid.create({
ID: "ManageMembersLgd",
showHeaderContextMenu: false,
dataSource: "datasource",
validateByCell: true,
saveOnEnter: true,
showRowNumbers: true,
selectionType: "multiple",
alternateRecordStyles: true,
showFilterEditor: true,
filterOnKeypress: true,
height: "100%",
width: "100%",
saveLocally: true,
fields: [
{
name: "Colum_field",
title: "Colum_field",
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 130,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 130,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 200,
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 125,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 100,
showHover: true,
valueField: "Colum_field",
optionDataSource: "data",
_constructor: "SelectItem",
filterEditorProperties:{
value:"Active", operator: "equals"
}
},
{
name: "Colum_field",
title: "Colum_field",
width: 100,
showHover: true,
valueField: "Colum_field",
optionDataSource: "data",
_constructor: "SelectItem"
},
{
name: "Colum_field",
title: "Colum_field",
width: 100,
type: "float",
defaultValue: 0.00,
roundToPrecision: 2,
decimalPad: 2,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 60,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 130,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
type: "link",
linkURLPrefix: "mailto:",
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 120,
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 110,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
type: "link",
linkURLPrefix: "mailto:",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 120,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 100,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "title"
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
}
],
sortFieldNum: 2,
wrapCells: true,
autoFetchData:true,
enforceVClipping: true
});
Export Button
isc.IButton.create({ ID: "btnManageMembersExport", autoDraw: false, height: 35, width: 220, title: "Export", click: function () { var exportAs = "ooxml"; ManageMembersLgd.exportData({ exportAs: exportAs, exportDisplay: "download" }); } });
Exception
java.lang.NullPointerException
at com.isomorphic.rpc.ExcelDataExport.outputHeaders(ExcelDataExport.java:1121)
at com.isomorphic.rpc.ExcelDataExport.getExportObject(ExcelDataExport.java:498)
at com.isomorphic.rpc.DataExport.exportResultSet(DataExport.java:664)
at com.isomorphic.rpc.DataExport.exportResultSet(DataExport.java:463)
at com.isomorphic.rpc.RPCManager.doExport(RPCManager.java:2125)
at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1028)
at com.isomorphic.rpc.RPCManager.send(RPCManager.java:810)
at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:183)
at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:148)
at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119)
at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:178)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at za.co.adminonline.servlet.SecurityCheck.doFilter(SecurityCheck.java:115)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:250)
at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
I have updated from SmartClient 10 power edition to SmartClient_v130p_2022-10-26_PowerEdition and now exporting a list grid is not working. Below is the code for the list grid, the button used for the export and the exception that is thrown on the server. I have found that when I reduce the number of columns that list grid has and don't have to scroll to the side, then the export works. But if there are columns are not visible without scrolling, then an excel document is downloaded but it only contains the list grid headers of the visible columns, the non visible columns(the ones you cannot see without scrolling to the side) and the data(rows) are not present. Can someone please tell me what am doing wrong. I am using tomcat 8
ListGrid
isc.ListGrid.create({
ID: "ManageMembersLgd",
showHeaderContextMenu: false,
dataSource: "datasource",
validateByCell: true,
saveOnEnter: true,
showRowNumbers: true,
selectionType: "multiple",
alternateRecordStyles: true,
showFilterEditor: true,
filterOnKeypress: true,
height: "100%",
width: "100%",
saveLocally: true,
fields: [
{
name: "Colum_field",
title: "Colum_field",
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 130,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 130,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 200,
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 125,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 100,
showHover: true,
valueField: "Colum_field",
optionDataSource: "data",
_constructor: "SelectItem",
filterEditorProperties:{
value:"Active", operator: "equals"
}
},
{
name: "Colum_field",
title: "Colum_field",
width: 100,
showHover: true,
valueField: "Colum_field",
optionDataSource: "data",
_constructor: "SelectItem"
},
{
name: "Colum_field",
title: "Colum_field",
width: 100,
type: "float",
defaultValue: 0.00,
roundToPrecision: 2,
decimalPad: 2,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 60,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 130,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
type: "link",
linkURLPrefix: "mailto:",
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 120,
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 110,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
type: "link",
linkURLPrefix: "mailto:",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 120,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 100,
align: "left",
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "",
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "title"
width: 100,
showHover: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
},
{
name: "Colum_field",
title: "Colum_field",
width: 165,
align: "left",
showHover: true,
visible: true
}
],
sortFieldNum: 2,
wrapCells: true,
autoFetchData:true,
enforceVClipping: true
});
Export Button
isc.IButton.create({ ID: "btnManageMembersExport", autoDraw: false, height: 35, width: 220, title: "Export", click: function () { var exportAs = "ooxml"; ManageMembersLgd.exportData({ exportAs: exportAs, exportDisplay: "download" }); } });
Exception
java.lang.NullPointerException
at com.isomorphic.rpc.ExcelDataExport.outputHeaders(ExcelDataExport.java:1121)
at com.isomorphic.rpc.ExcelDataExport.getExportObject(ExcelDataExport.java:498)
at com.isomorphic.rpc.DataExport.exportResultSet(DataExport.java:664)
at com.isomorphic.rpc.DataExport.exportResultSet(DataExport.java:463)
at com.isomorphic.rpc.RPCManager.doExport(RPCManager.java:2125)
at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1028)
at com.isomorphic.rpc.RPCManager.send(RPCManager.java:810)
at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:183)
at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:148)
at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119)
at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:178)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at za.co.adminonline.servlet.SecurityCheck.doFilter(SecurityCheck.java:115)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:250)
at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
Comment