Announcement

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

    SmartGWT Datasource.combineCriteria produces invalid AdvancedCriteria

    Checked against the latest nightlies 2013-06-26.

    The error occurs when combining advanced with simple criteria. The GWT DataSource.combineCriteria method in DataSource.java applies some half-way conversion to simple criteria
    Code:
    if (jsC1 != null) jsC1 = $wnd.isc.addProperties({_constructor:"AdvancedCriteria"},jsC1);
    if (jsC2 != null) jsC2 = $wnd.isc.addProperties({_constructor:"AdvancedCriteria"},jsC2);
    The JS DataSource.combineCriteria method in DataSource.js then just assumes the passed-in criteria are already advanced:
    Code:
    if (subCriteria || criteria1._constructor == "AdvancedCriteria") {
                advCrit1 = criteria1;
            } else {
                advCrit1 = isc.DataSource.convertCriteria(criteria1, textMatchStyle);
            }
    A complete conversion does not take place (e.g. applying an operator).
    The code would behave correctly when the GWT implementation of combineCriteria did not add the property "_constructor": "AdvancedCriteria". Then the JS implementation would perform a proper conversion by calling isc.DataSource.convertCriteria

    #2
    Thanks for the clear report - this is fixed for tomorrow's 9.0 and 9.1 builds.

    Comment

    Working...
    X