Announcement

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

    Upgrading from SmartGWT 12.0p to 12.1p DataSourceField/ListGridSummaryField problem

    Hi,

    I am migrating from version 12.0p to version 12.1p.
    I have a problem, when a DataSourceField is assigned in
    ListGridSummaryField I get the following error message during an update
    of the recording (Problem which does not exist in version 12.0p).

    Thank you in advance

    SGWT : 12.1p (build 2020-05-13) / 12.0p (build 2020-05-13)
    Linux : Fedora 31
    Chromium: 80.0.3987.163
    Gwt : 2.8.2

    GridSummariesSample.java

    ISC_Core.js?isc_version=12.1p_2020-05-13.js:1262 *13:18:06.092:MUP3:WARN:Log:TypeError: _2.$199v is not a function
    Stack from error.stack:
    Canvas._getDataPathFromField(<no args: exited>) on [Class DynamicForm] @ ISC_Core.js:4251:442
    Canvas._saveFieldValue(<no args: exited>) on [Class DynamicForm] @ ISC_Core.js:4251:148
    DynamicForm._saveValue(<no args: exited>) on [DynamicForm ID:isc_DynamicForm_36] @ ISC_Forms.js:356:17
    DynamicForm._saveAtomicValue(<no args: exited>) on [DynamicForm ID:isc_DynamicForm_36] @ ISC_Forms.js:355:472
    DynamicForm.saveItemValue(<no args: exited>) on [DynamicForm ID:isc_DynamicForm_36] @ ISC_Forms.js:354:712
    FormItem.saveValue(<no args: exited>) on [TextItem ID:isc_TextItem_8 name:quantity] @ ISC_Forms.js:1114:91
    [c]Class.invokeSuper(<no args: exited>) on [TextItem ID:isc_TextItem_8 name:quantity] @ ISC_Core.js:298:93
    [c]Class.Super(<no args: exited>) on [TextItem ID:isc_TextItem_8 name:quantity] @ ISC_Core.js:290:170
    TextItem.saveValue(<no args: exited>) on [TextItem ID:isc_TextItem_8 name:quantity] @ ISC_Forms.js:1950:167
    FormItem.setValue(<no args: exited>) on [TextItem ID:isc_TextItem_8 name:quantity] @ ISC_Forms.js:1124:6
    [c]Class.invokeSuper(<no args: exited>) on [TextItem ID:isc_TextItem_8 name:quantity] @ ISC_Core.js:298:162
    TextItem.setValue(<no args: exited>) on [TextItem ID:isc_TextItem_8 name:quantity] @ ISC_Forms.js:1956:9
    DynamicForm.setItemValues(<no args: exited>) on [DynamicForm ID:isc_DynamicForm_36] @ ISC_Forms.js:429:163
    DynamicForm.setValues(<no args: exited>) on [DynamicForm ID:isc_DynamicForm_36] @ ISC_Forms.js:308:22
    ListGrid.makeEditForm(<no args: exited>) on[ListGrid ID:isc_ListGrid_0] @ ISC_Grids.js:2087:73
    ListGrid._canFocusInEditor(<no args: exited>) on[ListGrid ID:isc_ListGrid_0] @ ISC_Grids.js:2376:156
    ListGrid.findNextEditCell(<no args: exited>) on[ListGrid ID:isc_ListGrid_0] @ ISC_Grids.js:2364:498
    ListGrid.handleEditCellEvent(<no args: exited>) on[ListGrid ID:isc_ListGrid_0] @ ISC_Grids.js:1982:79
    ListGrid.rowDoubleClick(<no args: exited>) on[ListGrid ID:isc_ListGrid_0] @ ISC_Grids.js:1742:70
    _3.eval(<no args: exited>) on [GridBody ID:isc_ListGrid_0_body] @ [no file]:4:115
    GridRenderer.doubleClick(<no args: exited>) on [GridBody ID:isc_ListGrid_0_body] @ ISC_Grids.js:591:31
    Canvas.handleDoubleClick(<no args: exited>) on [GridBody ID:isc_ListGrid_0_body] @ ISC_Core.js:3862:597
    [c]EventHandler.bubbleEvent(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2415:89
    [c]EventHandler.handleClick(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2247:50
    EventHandler._handleMouseUp(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2229:11
    [c]EventHandler.handleMouseUp(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2220:57
    [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>[object MouseEvent]) on [Class EventHandler] @ ISC_Core.js:2510:122
    HTMLDocument.eval(event=>[object MouseEvent]) @ [no file]:3:123

    isc.B.push.isc.A.addToMasterLog @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:1262
    isc_c_Log_addLogMessage @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:1260
    isc_c_Log_log @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:1253
    logMessage @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:1242
    logWarn @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:1242
    isc__debug__reportJSErrorStack @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:1215
    isc__debug__reportJSError @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:1215
    isc_c_EventHandler_dispatch @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:2510
    eval @ VM21:3

    ISC_Core.js?isc_version=12.1p_2020-05-13.js:4251 Uncaught TypeError: _2.$199v is not a function
    at Object.isc_c_Canvas__getDataPathFromField [as $923] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:4251)
    at Object.isc_c_Canvas__saveFieldValue [as $70n] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:4251)
    at _3.isc_DynamicForm__saveValue [as $10w] (ISC_Forms.js?isc_version=12.1p_2020-05-13.js:356)
    at _3.isc_DynamicForm__saveAtomicValue [as $924] (ISC_Forms.js?isc_version=12.1p_2020-05-13.js:355)
    at _3.isc_DynamicForm_saveItemValue [as saveItemValue] (ISC_Forms.js?isc_version=12.1p_2020-05-13.js:354)
    at _3.isc_FormItem_saveValue [as saveValue] (ISC_Forms.js?isc_version=12.1p_2020-05-13.js:1114)
    at _3.isc_c_Class_invokeSuper [as invokeSuper] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:298)
    at _3.isc_c_Class_Super [as Super] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:290)
    at _3.isc_TextItem_saveValue [as saveValue] (ISC_Forms.js?isc_version=12.1p_2020-05-13.js:1950)
    at _3.isc_FormItem_setValue [as setValue] (ISC_Forms.js?isc_version=12.1p_2020-05-13.js:1124)
    at _3.isc_c_Class_invokeSuper [as invokeSuper] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:298)
    at _3.isc_TextItem_setValue [as setValue] (ISC_Forms.js?isc_version=12.1p_2020-05-13.js:1956)
    at _3.isc_DynamicForm_setItemValues [as setItemValues] (ISC_Forms.js?isc_version=12.1p_2020-05-13.js:429)
    at _3.isc_DynamicForm_setValues [as setValues] (ISC_Forms.js?isc_version=12.1p_2020-05-13.js:308)
    at _3.isc_ListGrid_makeEditForm [as makeEditForm] (ISC_Grids.js?isc_version=12.1p_2020-05-13.js:2087)
    at _3.isc_ListGrid__canFocusInEditor [as $60w] (ISC_Grids.js?isc_version=12.1p_2020-05-13.js:2376)
    at _3.isc_ListGrid_findNextEditCell [as findNextEditCell] (ISC_Grids.js?isc_version=12.1p_2020-05-13.js:2364)
    at _3.isc_ListGrid_handleEditCellEvent [as handleEditCellEvent] (ISC_Grids.js?isc_version=12.1p_2020-05-13.js:1982)
    at _3.isc_ListGrid_rowDoubleClick [as rowDoubleClick] (ISC_Grids.js?isc_version=12.1p_2020-05-13.js:1742)
    at _3.eval [as rowDoubleClick] (eval at isc__makeFunction (ISC_Core.js?isc_version=12.1p_2020-05-13.js:65), <anonymous>:4:115)
    at _3.isc_GridRenderer_doubleClick [as doubleClick] (ISC_Grids.js?isc_version=12.1p_2020-05-13.js:591)
    at _3.isc_Canvas_handleDoubleClick [as handleDoubleClick] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:3862)
    at _3.isc_c_EventHandler_bubbleEvent [as bubbleEvent] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:2415)
    at _3.isc_c_EventHandler_handleClick [as handleClick] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:2247)
    at _3.isc_c_EventHandler__handleMouseUp [as $k5] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:2229)
    at _3.isc_c_EventHandler_handleMouseUp [as handleMouseUp] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:2220)
    at _3.isc_c_EventHandler_dispatch [as dispatch] (ISC_Core.js?isc_version=12.1p_2020-05-13.js:2510)
    at HTMLDocument.eval (eval at isc__makeFunction (ISC_Core.js?isc_version=12.1p_2020-05-13.js:65), <anonymous>:3:123)
    isc_c_Canvas__getDataPathFromField @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:4251
    isc_c_Canvas__saveFieldValue @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:4251
    isc_DynamicForm__saveValue @ ISC_Forms.js?isc_version=12.1p_2020-05-13.js:356
    isc_DynamicForm__saveAtomicValue @ ISC_Forms.js?isc_version=12.1p_2020-05-13.js:355
    isc_DynamicForm_saveItemValue @ ISC_Forms.js?isc_version=12.1p_2020-05-13.js:354
    isc_FormItem_saveValue @ ISC_Forms.js?isc_version=12.1p_2020-05-13.js:1114
    isc_c_Class_invokeSuper @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:298
    isc_c_Class_Super @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:290
    isc_TextItem_saveValue @ ISC_Forms.js?isc_version=12.1p_2020-05-13.js:1950
    isc_FormItem_setValue @ ISC_Forms.js?isc_version=12.1p_2020-05-13.js:1124
    isc_c_Class_invokeSuper @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:298
    isc_TextItem_setValue @ ISC_Forms.js?isc_version=12.1p_2020-05-13.js:1956
    isc_DynamicForm_setItemValues @ ISC_Forms.js?isc_version=12.1p_2020-05-13.js:429
    isc_DynamicForm_setValues @ ISC_Forms.js?isc_version=12.1p_2020-05-13.js:308
    isc_ListGrid_makeEditForm @ ISC_Grids.js?isc_version=12.1p_2020-05-13.js:2087
    isc_ListGrid__canFocusInEditor @ ISC_Grids.js?isc_version=12.1p_2020-05-13.js:2376
    isc_ListGrid_findNextEditCell @ ISC_Grids.js?isc_version=12.1p_2020-05-13.js:2364
    isc_ListGrid_handleEditCellEvent @ ISC_Grids.js?isc_version=12.1p_2020-05-13.js:1982
    isc_ListGrid_rowDoubleClick @ ISC_Grids.js?isc_version=12.1p_2020-05-13.js:1742
    eval @ VM87:4
    isc_GridRenderer_doubleClick @ ISC_Grids.js?isc_version=12.1p_2020-05-13.js:591
    isc_Canvas_handleDoubleClick @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:3862
    isc_c_EventHandler_bubbleEvent @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:2415
    isc_c_EventHandler_handleClick @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:2247
    isc_c_EventHandler__handleMouseUp @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:2229
    isc_c_EventHandler_handleMouseUp @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:2220
    isc_c_EventHandler_dispatch @ ISC_Core.js?isc_version=12.1p_2020-05-13.js:2510
    eval @ VM21:3


    #2
    We've addressed this and the fix should be available in the nightly builds dated 2020-05-16 and beyond. The problem is that you're redefining an existing field in the DataSource as a summary field, one that has values present in the initial data. Normally, in SC 12.1+, when you declare a summary field of a given name, nothing is written into that property in the record explicitly, so it was unexpected.

    Comment


      #3
      Hi,

      Thank you very much for the fix, but for being in the same
      type of operation as version 12.0p :

      ListGridRecord[ ] _sum = grid.getGridSummaryData();
      String _val = _sum[0].getAttributeAsString("dataSourcefield");

      _val should not return the null value, but the value of the calculation.

      Thank you in advance

      Comment


        #4
        We're not sure we understood your report, but it sounds like you've found that the summary value isn't stored in the record under its field name? This is as intended - previous to the SGWT/SC 12.1p release, we made no claim about where the summary values might be stored, or whether they were stored in the record at all.

        As of the 12.1p release, we cache these values in the field name prefixed by recordSummaryAttributePrefix, which defaults to underscore. If for some reason you want the summary values written into the field name value as was the previous (undocumented) behavior, you can set this property to empty string ("").

        Comment


          #5
          Hi,

          Indeed, it is much clearer now, I had not seen this new function.

          Thank you so much.

          Comment

          Working...
          X