Announcement

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

    Bug: Criteria with String[] infinite loop when passed to listGrid.filterData()

    IGNORE: NOT A BUG! (issue was in the custom datasource implementation, not part of SmartGWT)

    SmartGWT Pro 3.1p-2012-11-29 / GWT:2.4, OSX 10.6.8
    Tried with both DevMode and without.
    Firefox and Safari (browser may be irrelevant)

    Code:
    Criteria searchFilterCriteria = new Criteria();
                            searchFilterCriteria.addCriteria("HIDDEN", false);
                            searchFilterCriteria.addCriteria("STATUS", statusFilter.toArray(new String[0])); //array of statuses: ACTIVE, HIDDEN, etc.
                            searchFilterCriteria.addCriteria("NAME", searchText.getValueAsString());
                            listGrid.filterData(searchFilterCriteria);
    Here is the output of the payload:
    Code:
    === 2012-11-29 17:38:46,346 [0-12] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            HIDDEN:false,
            STATUS:[
                "ACTIVE"
            ],
            NAME:"beta"
        },
        operationConfig:{
            dataSource:"product_authdef_DS_HibernateORM",
            operationType:"fetch",
            textMatchStyle:"substring"
        },
        startRow:0,
        endRow:75,
        componentId:"Deposit_product_authdef_DS_HibernateORM_Search_ListGrid",
        appID:"builtinApplication",
        operation:"product_authdef_DS_HibernateORM_fetch",
        oldValues:{
            HIDDEN:false,
            STATUS:[
                "ACTIVE"
            ],
            NAME:"beta"
        }
    }

    As soon as filterData() is executed, it goes into an infinite loop calling the server-side data source.

    If I replace filterData(searchFilterCriteria) with fetchData(searchFilterCriteria), works as expected - no loop but I need a substring/case insensitive match so fetch isn't a work-around for me.

    If I remove String[] from the criteria, it also works as expected - no loop.
    Last edited by hlevin; 29 Nov 2012, 18:11. Reason: not a bug

    #2
    Always post the server-side log for the request for any server-side issue.

    Typically an infinite fetch loop would be triggered by nonsense startRow/endRow values, so if you have DMI code or any other custom logic that messes with data *or* metadata, try removing it.

    Also, we'd need to see the DataSource definition to understand whether the criteria is invalid.

    Comment


      #3
      Not a bug, please feel free to remove this thread if possible.
      Last edited by hlevin; 29 Nov 2012, 18:12.

      Comment

      Working...
      X