Announcement

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

    ListGrid getFilterEditorCriteria() problem

    Hi.
    Today I've found problem with ListGrid's getFilterEditorCriteria() method

    When ListGrid contains DataSourceField of type FieldType.DATE or FieldType.DATETIME then Criteria returned by method getFilterEditorCriteria() are strange.
    returned criteria have keys - values:
    operator - and
    _constructor - AdvancedCriteria
    criteria - [object Object]

    fields causing problems are defined like that:
    new DataSourceField("data_termin", FieldType.DATE, "Termin"),
    new DataSourceField("data", FieldType.DATETIME, "Data"),

    I use RestDataSource and JSON DataFormat:
    RestDataSource s = new RestDataSource();
    s.setDataFormat(DSDataFormat.JSON);
    s.setDataURL(url2 + "?j=przet");
    s.setFields(rd);
    s.setClientOnly(false);

    if ListGrid doesn't contain FieldType.DATE or FieldType.DATETIME fields everything is OK.

    Can you tell me is it some sort of error or maybe I'm doing something wrong ?
    Last edited by slovekfhu; 2 Jun 2010, 10:06.

    #2
    Hi,

    I have the same problem.
    I am using nightly from 2010-06-17.
    I am considering implementing AdvancedCriteria in my backend as a workaround.

    Isomorphic, could you please tell us if this is a bug or is it by design?

    Best regards,
    Janusz

    Comment


      #3
      By design the default filterEditor for a date or date time field is now a date range control, which necessarily returns Advanced Criteria. But you change back via sting filterEditorType.

      Comment

      Working...
      X