Announcement

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

    Wrong warning for DataSource.setCacheData() when used with Record[]

    Hi Isomorphic,

    after your suggestion here, I'm implementing this (using v10.1p_2017-02-22).

    Now I have this code:
    Code:
            ArrayList<Record> recordList = new ArrayList<Record>();
            Record r = new Record();
            r.setAttribute(DISPLAYFIELD, mappedValue[0]);
            ...
            ...
            recordList.add(r);
            [B]ds.setCacheData(recordList.toArray(new Record[recordList.size()]));[/B]
    This gets me this warning:
    WARN:Log:setCacheData(): DataSource cache data is expected to be an array of ListGridRecords. This allows the data to be displayed as expected in ListGrids bound to this dataSource.
    The signature of setCacheData() is setCacheData(Record... cacheData) so it should not warn when not setting ListGridRecords, should it?

    EDIT: Testcase is here.

    Best regards
    Blama
    Last edited by Blama; 23 Feb 2017, 03:28. Reason: Added testcase

    #2
    The warning is correct. We added the warning because the signature doesn't force you to use ListGridRecord, so the warning tells you.

    Comment


      #3
      Hi Isomorphic,

      OK, thanks a lot.

      Best regards
      Blama

      Comment

      Working...
      X