Announcement

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

  • Blama
    replied
    Hi Isomorphic,

    it seems that using v12.1p_2022-10-22 my issue with the null-criteria crash from #13 is gone. Also, I don't see the twice applied criteria from #15 anymore.
    I think all the issues from this thread are gone now, but will double check that the initial issue from #1 is still gone within my application.

    Thank you & Best regards
    Blama

    Leave a comment:


  • Isomorphic
    replied
    The issue with implicitCriteria being included twice (and also, as a side-effect, simple crit being upscaled to advanced) has been addressed.

    Please retest with a build dated October 21 or later.

    Leave a comment:


  • Isomorphic
    replied
    Quick follow-up on our comment in #14 - as we said we might, we've made some enhancements to DBC.setImplicitCriteria()

    - added a "callback" param that fires if a fetch is issued
    - added an "initialFetch" param, which allows setImplicitCriteria() to issue an initial-fetch if the component's data has not previously been fetched against
    - added a return value - true if a fetch was issued, false otherwise

    SGWT will have a second signature that matches the above, and you can try these changes out in tomorrow's builds, dated October 20 or later.

    We'll fix the double criteria shortly and update here again.

    Leave a comment:


  • Isomorphic
    replied
    We'll take a look and get back to you

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    using v12.1p_2022-10-18 and the testcase from #13 the exception is gone and there is no fetch for the 2nd button, like you say.
    This already helps and together with your explanation from #14 I'm pretty sure that also my ResultSet-warning, that I could never explain, but that also did not cause problems, will be gone.
    There is another issue, though: I believe the criteria is applied twice. See this request for a click on the 1st button.

    Best regards
    Blama

    Code:
    {
        dataSource:"worldDS",
        operationType:"fetch",
        componentId:"filterGrid",
        data:{
            operator:"and",
            criteria:[
                {
                    fieldName:"continent",
                    operator:"inSet",
                    value:[
                        "Africa",
                        "Asia",
                        "Australia/Oceania",
                        "Europe",
                        "North America",
                        "South America"
                    ]
                }[B],
                {
                    fieldName:"continent",
                    operator:"inSet",
                    value:[
                        "Africa",
                        "Asia",
                        "Australia/Oceania",
                        "Europe",
                        "North America",
                        "South America"
                    ]
                }[/B]
            ]
        },
        startRow:0,
        endRow:80,
        sortBy:[
            "continent"
        ],
        textMatchStyle:"exact",
        resultSet:[ResultSet ID:isc_ResultSet_0 (dataSource: worldDS, created by: filterGrid)],
        callback:{
            caller:[ResultSet ID:isc_ResultSet_0 (dataSource: worldDS, created by: filterGrid)],
            methodName:"fetchRemoteDataReply"
        },
        willHandleError:true,
        showPrompt:true,
        prompt:"Finding Records that match your criteria...",
        oldValues:{
            operator:"and",
            criteria:[
                {
                    fieldName:"continent",
                    operator:"inSet",
                    value:[
                        "Africa",
                        "Asia",
                        "Australia/Oceania",
                        "Europe",
                        "North America",
                        "South America"
                    ]
                },
                {
                    fieldName:"continent",
                    operator:"inSet",
                    value:[
                        "Africa",
                        "Asia",
                        "Australia/Oceania",
                        "Europe",
                        "North America",
                        "South America"
                    ]
                }
            ]
        },
        requestId:"worldDS$6279",
        internalClientContext:{
            requestIndex:1
        },
        fallbackToEval:false,
        lastClientEventThreadCode:"MUP0",
        bypassCache:true,
        dataProtocol:"getParams"
    }

    Leave a comment:


  • Isomorphic
    replied
    hi Blama ,

    We've addressed this crash for today's builds, dated October 18 and later.

    Your code got here because the grid is both grouped and autoFetchData:false, and no previous fetch had occurred - the grid is drawn/initialized so, since it's grouped, grid.data is an isc.Tree but, since nothing has been fetched, grid.originalData is not yet a ResultSet. If the grid had fetched previously, you wouldn't have hit this crash.

    Anyway - with the crash resolved, note that a call to setImplicitCriteria() in this situation (sans any fetch, so your sample's second button) will apply your criteria to the grid itself, but will not cause an automatic refresh, because there is still no ResultSet for it to filter. This is also how setCriteria() behaves in this scenario.

    We're considering a new param to override that fetching behavior and a callback to better interact with that flow. We'll update here when we have more information on that.

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    here a testcase that shows the issue using v12.1p_2022-09-29:
    Code:
    isc.ListGrid.create({
        ID: "filterGrid",
        width: 850,
        height: 500,
        alternateRecordStyles: true,
        dataSource: worldDS,
        autoFetchData: false,
        groupByField: "continent",
        groupStartOpen: "all",
        sortField: "continent",
        groupByMaxRecords: 80,
        sortByGroupFirst: "true",
        implicitCriteria: {
            _constructor: "AdvancedCriteria",
            operator: "and",
            criteria: [{
                fieldName: "continent",
                operator: "inSet",
                value: ["Africa", "Asia", "Australia/Oceania", "Europe", "North America", "South America"]
            }]
        },
        fields: [{
            name: "countryCode",
            width: 60
        }, {
            name: "government",
        }, {
            name: "continent",
        }, {
            name: "capital",
        }, {
            name: "independence",
            width: 100
        }, {
            name: "population",
            width: 100
        }, {
            name: "gdp",
            width: 85
        }]
    });
    
    isc.IButton.create({
        ID: "justFetch",
        width: 250,
        title: "Just fetchData() (OK)",
        click: function() {
            filterGrid.fetchData();
        }
    });
    
    isc.IButton.create({
        ID: "justIC",
        width: 250,
        title: "Just setImplicitCriteria (not OK)",
        click: function() {
            filterGrid.setImplicitCriteria({
                _constructor: "AdvancedCriteria",
                operator: "and",
                criteria: [{
                    fieldName: "continent",
                    operator: "inSet",
                    value: ["Europe", "North America", "South America"]
                }]
            });
        }
    });
    
    isc.IButton.create({
        ID: "icPlusFetch",
        width: 250,
    
        title: "setImplicitCriteria() + fetchData() (not OK)",
        click: function() {
            filterGrid.setImplicitCriteria(null);
            filterGrid.fetchData();
        }
    });
    isc.HStack.create({
        ID: "btnStack",
        membersMargin: 30,
        height: 1,
        members: [
            justFetch, justIC, icPlusFetch
        ]
    });
    
    isc.VStack.create({
        membersMargin: 30,
        members: [
            btnStack, filterGrid
        ]
    });
    In my SmartGWT application I also set the implicitCriteria with the function, as the property does not exist like it does in JavaScript.

    Best regards
    Blama

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    yes, this sounds familiar. I've always had this 1st line in my log, which is now directly before the exception in question. I'll try to reproduce.
    But there is no Tree or ResultTree or manual providing of data in my code. Data comes from a fetchData() call.
    Code:
    *19:15:50.458:XRP0:WARN:Log:getResultSet(): data is not a ResultSet; returning null (if grouped, use getOriginalResultSet(); if unbound, use getRecordList(); can only be called on DataBoundComponents after initial data has been fetched)
    *19:15:50.656:XRP0:WARN:Log:Uncaught exception escaped: com.google.gwt.core.client.JavaScriptException
    (TypeError) : d.setDbcImplicitCriteria is not a function
        at setImplicitCriteria(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at setProperties(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
    Best regards
    Blama

    Leave a comment:


  • Isomorphic
    replied
    We still can't reproduce, but the basic problem seems to be that there is no ResultSet available when setImplicitCriteria() runs. We'll address the crash, of course, but it would still be useful to know how you're hitting it.

    Perhaps your app uses a TreeGrid, or applies a manual Tree or ResultTree as data, or setImplicitCriteria() may be being called before grid.data has been initialized.
    Last edited by Isomorphic; 12 Oct 2022, 01:47.

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    yes, that was in my application, not in the testcase. I'll try to reproduce in the testcase.

    Best regards
    Blama

    Leave a comment:


  • Isomorphic
    replied
    Hi Blama
    Can you clarify how exactly you're getting this JS error?

    We tried copy/pasting the code from post #1 to the sample here: https://www-demos.smartclient.com/sm...advancedFilter
    [At the time of posting, this is currently running 12.1 from 2022/09/29]
    We don't see the error on load or from following your original steps

    Thanks

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    I tried my code that is working fine with v12.1p_2022-08-10 now with v12.1p_2022-09-29 and seem to have problems.
    I get this exception (row numbers modules-debug). As setDbcImplicitCriteria() is mentioned, I assume this might be related to your change.

    Best regards
    Blama

    Code:
    *19:04:42.323:XRP9:WARN:Log:Uncaught exception escaped: com.google.gwt.core.client.JavaScriptException
    (TypeError) : d.setDbcImplicitCriteria is not a function
        at setImplicitCriteria(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at setProperties(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at setProperty(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at _cb(https://lms.localhost/ line 10 > injectedScript)
        at Mcb(https://lms.localhost/ line 10 > injectedScript)
        at rtc(https://lms.localhost/ line 10 > injectedScript)
        at Aqc(https://lms.localhost/ line 10 > injectedScript)
        at Bqc(https://lms.localhost/ line 10 > injectedScript)
        at ekc(https://lms.localhost/ line 10 > injectedScript)
        at _Hc(https://lms.localhost/ line 10 > injectedScript)
        at ykc(https://lms.localhost/ line 10 > injectedScript)
        at Akc(https://lms.localhost/ line 10 > injectedScript)
        at Fkc(https://lms.localhost/ line 10 > injectedScript)
        at ezb(https://lms.localhost/ line 10 > injectedScript)
        at fzb(https://lms.localhost/ line 10 > injectedScript)
        at Ayb(https://lms.localhost/ line 10 > injectedScript)
        at mqe/<(https://lms.localhost/ line 10 > injectedScript)
        at Zc(https://lms.localhost/ line 10 > injectedScript)
        at ad(https://lms.localhost/ line 10 > injectedScript)
        at _c/<(https://lms.localhost/ line 10 > injectedScript)
        at fireCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at fireCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at _performTransactionReply(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at performTransactionReply(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at anonymous(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js line 2511 > Function)
        at fireCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at performXmlTransactionReply(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at anonymous(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js line 2511 > Function)
        at fireCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at _fireXMLCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at loadFunc(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at EventHandlerNonNull*sendXmlHttpRequest(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at _sendQueue(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at sendQueue(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at mqe(https://lms.localhost/ line 10 > injectedScript)
        at RAb(https://lms.localhost/ line 10 > injectedScript)
        at pyb(https://lms.localhost/ line 10 > injectedScript)
        at callback<(https://lms.localhost/ line 10 > injectedScript)
        at Zc(https://lms.localhost/ line 10 > injectedScript)
        at ad(https://lms.localhost/ line 10 > injectedScript)
        at _c/<(https://lms.localhost/ line 10 > injectedScript)
        at fireCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at fireCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at fireReplyCallback(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at isc.RPCManager.fireReplyCallback(https://lms.localhost/ line 10 > injectedScript)
        at fireReplyCallbacks(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at performOperationReply(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at _performTransactionReply(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at performTransactionReply(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at anonymous(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js line 2511 > Function)
        at fireCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at performXmlTransactionReply(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at anonymous(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js line 2511 > Function)
        at fireCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at _fireXMLCallback(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at loadFunc(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at EventHandlerNonNull*sendXmlHttpRequest(https://lms.localhost/lms/sc/modules/ISC_Core.js?isc_version=v12.1p_2022-09-29.js)
        at _sendQueue(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at sendQueue(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at sendRequest(https://lms.localhost/lms/sc/modules/ISC_DataBinding.js?isc_version=v12.1p_2022-09-29.js)
        at nqe(https://lms.localhost/ line 10 > injectedScript)
        at dyb(https://lms.localhost/ line 10 > injectedScript)
        at j9(https://lms.localhost/ line 10 > injectedScript)
        at g(https://lms.localhost/ line 10 > injectedScript)
        at Zc(https://lms.localhost/ line 10 > injectedScript)
        at ad(https://lms.localhost/ line 10 > injectedScript)
        at _c/<(https://lms.localhost/ line 10 > injectedScript)
        at a9(https://lms.localhost/ line 10 > injectedScript)
        at anonymous(lms-0.js)
        at m(https://lms.localhost/lms/lms.nocache.js)
        at onScriptDownloaded/<(https://lms.localhost/lms/lms.nocache.js)
        at d(https://lms.localhost/lms/lms.nocache.js)
        at handleEvent*l(https://lms.localhost/lms/lms.nocache.js)
        at onScriptDownloaded(https://lms.localhost/lms/lms.nocache.js)
        at anonymous(https://lms.localhost/lms/F743C19BA3C5B4CAD86D24A5B6EF30BF.cache.js)
        at anonymous()

    Leave a comment:


  • Isomorphic
    replied
    You should still take tomorrow's build of 12.1 to pick up the fix (which has been refined today).

    The problem was actually that, in a grid with a groupByMaxRecords value, the initial fetch for data sets an internal flag to temporarily prevent dataChanged() from issuing a redraw - but the flag wasn't being cleared, in this case, so dataChanged() was never redrawing the grid after that point, unless a regroup had been performed.
    Last edited by Isomorphic; 13 Sep 2022, 04:52.

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    it seems to work as expected with v12.1p_2022-08-10 + filterGrid.markForRedraw() in my application.

    Thanks a lot,
    Blama

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    there are no new builds for today as of now, but I can see that the sample code from #1 + filterGrid.markForRedraw() works in v12.1p_2022-09-09. Thank you very much.
    I'll also test that in my application.
    If markForRedraw() works there as well, I might stay with my version (v12.1p_2022-08-10), as quite some time of manual testing went in there already.

    Thank you & Best regards
    Blama

    Leave a comment:

Working...
X