Announcement

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

    Forced to setFields before setHilites

    In the nightly built version (3.0⁻2012-08-01) of smartgwtPower and analytics module, take the basic cube grid in the show cases as an exemple, which has not a bound data source, nor setFields is called. Call setHilites will cause the exception: JavaScriptException: (TypeError): this.fields is undefined;
    So I have to call setFields firstly. However, whatever fields are set (even if they are not correct ones), the hilites will be working. Seems like a new bug, not found in the previous version

    #2
    I can confirm I'm getting the same issue on the "v8.2p_2012-08-06/LGPL Development Only (built 2012-08-06)" build. My workaround is to use the following before assigning Hilites:
    Code:
    setUseAllDataSourceFields(true);
    setFields(new ListGridField[] {});
    However, my hilites are not working properly anymore. I have a criteria set up to match records with the "archived" attribute set to true, but it's just highlighting everything. This used to work:
    Code:
    // Set the criteria to find groups where the ARCHIVED flag is true.
    archivedHilite.setCriteria(new Criterion(PartGroupingRestDataSource.ARCHIVED_COL_NAME,
        OperatorId.EQUALS, true));
    I've tried using AdvancedCriteria instead, as well as
    Code:
    Criteria(PartGroupingRestDataSource.ARCHIVED_COL_NAME, "true");

    Comment


      #3
      We're having difficulty reproducing the reported issue.
      Can you verify whether this is still happening for you with the latest nightly build from the http://smartclient.com/builds page?

      If so - can you show us full code to reproduce.
      You mention that you're getting this on a modified version of the basic cube sample - if you can show us your complete modified version of that example, this would give us enough to go on. Alternatively a minimal standalone test case.
      Essentially we need something we can run on our end to reproduce the problem.

      Regards
      Isomorphic Software

      ----
      Update: Even though we didn't reproduce this on our end from some quick testing, we have just made a change which may resolve this issue for you - please do try with the next nightly build (3.0p branch, dated Aug 14 or greater) as the issue may just be resolved at this stage.
      Last edited by Isomorphic; 13 Aug 2012, 16:40.

      Comment


        #4
        I tried the current nightly build and it didn't solve the problem, which made me go back and re-check my code. I found that I wasn't adding the field that I was setting the criteria on to the DataSource (though it was in the XML coming back from the server), and for some reason the expression in my criteria evaluated to true every time even though the field wasn't present.

        I'm not sure how it ever worked, but there you have it. Sorry to send you guys on a wild-goose chase.

        Comment

        Working...
        X