No announcement yet.
  • Filter
  • Time
Clear All
new posts

  • Isomorphic
    This is fixed and will be available for download in nightly builds since Oct 4.

    Leave a comment:

  • jbrasee_iqs
    I was able to work around this issue by extending the IDACall servlet and overriding handleDSRequest() to loop through the DSResponse data and truncate fields as needed before sending off the response for export. (Note that this is for a server-side export, so it may not be entirely applicable to the exportClientData example given in my original post.)

    public DSResponse handleDSRequest(DSRequest req, RPCManager rpc, RequestContext reqContext) throws Exception {
        DSResponse resp = super.handleDSRequest(req, rpc, reqContext);
            //loop through records from resp.getDataList() and truncate long field values
        return resp;
    Last edited by jbrasee_iqs; 19th Aug 2019, 06:23.

    Leave a comment:

  • SmartGWTEE 12.0p -- Max Length Exception with ListGrid OOXML export

    isc Version: v12.0p_2019-08-11/Enterprise Deployment
    GWT Version: 2.7.0
    Browser: Chrome 76.0.3809.100 (Official Build) (64-bit
    OS: Windows 10

    Hi, I am running into an error exporting a ListGrid to Excel when the grid contains fields that are too long to fit in an Excel cell (the max length in Excel is 32,767 characters). The export does not outright fail or display an error, but the exported file is an unformatted, incomplete result set that ends at the problematic cell. Below are the steps to reproduce my issue in the built-in-ds sample project.

    Setup Steps

    1. Modify /war/WEB-INF/db/hsqldb/isomorphic.script

    In the animals table declaration on line 71, replace "INFORMATION VARCHAR(1000)" with "INFORMATION VARCHAR(50000)"

    2. Modify /war/ds/animals.ds.xml

    In the information field definition on line 22, set length="50000"

    3. Modify /src/com/smartgwt/sample/client/

    Add an export button to the form at line 171

    IButton exportBtn = new IButton("Export");
    exportBtn.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            DSRequest requestProperties = new DSRequest();
    Test Steps
    1. Start the server and select the Animals DataSource
    2. Edit the Alligator record and set "Interesting Facts" to a string longer than 32767 characters.
    3. Save the animal record.
    4. Click export.
    Click image for larger version  Name:	export_animals.jpg Views:	1 Size:	222.9 KB ID:	259008

    Click image for larger version  Name:	excel_export.jpg Views:	1 Size:	34.0 KB ID:	259009

    The file is exported, but only contains one row (everything up to the Interesting Facts cell)
    A stack trace is displayed in the server console:

    java.lang.IllegalArgumentException: The maximum length of cell contents (text) is 32,767 characters
    at org.apache.poi.xssf.streaming.SXSSFCell.setCellValue(
    at com.isomorphic.rpc.ExcelDataExport.getExportObject(
    at com.isomorphic.rpc.DataExport.exportResultSet(
    at com.isomorphic.rpc.DataExport.exportResultSet(
    at com.isomorphic.rpc.BuiltinRPC.downloadClientExport(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    I know the data being exported is incompatible and so the export should fail in some way, but I am not sure if this particular outcome is expected or not. Or is there something I should be doing in the export request itself (maybe in the requestProperties) to ensure the offending data is truncated or excluded?

    Last edited by jbrasee_iqs; 13th Aug 2019, 05:16.