Announcement

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

    Problem with filterData and FilterEditor since build smartgwt-2.3 revision.1541

    Hi,

    This occurs since build smartgwt-2.3 revision.1541 and later in Development mode and normal browser

    I have this message when I run a filter from FilterEditor :
    ------------------------------------------------------------------

    DataSource:modele_filtre_ds:Operator iContains is not valid for field modele_nul. Continuing anyway.

    com.smartgwt.client.core.JsObject$SGWT_WARN: 09:01:29.245:KPR4:WARN:DataSource:modele_filtre_ds:Operator iContains is not valid for field modele_nul. Continuing anyway.

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
    at java.lang.Thread.run(Thread.java:662)

    Indeed this field (modele_nul) is not present in the datasource,
    but all the same it tries to filter and criteria
    content in the fieldEditor are not taken into account.

    before filterData and FilterEditor did not take into account the criteria not presented
    in time fields datasource

    My ListGrid :
    selModGrid.setDataSource(instFil);
    selModGrid.setShowAllRecords(true);
    selModGrid.setWrapCells(true);
    selModGrid.setFixedRecordHeights(false);
    selModGrid.setAlternateRecordStyles(false);
    selModGrid.setCanResizeFields(true);
    selModGrid.setCanReorderFields(false);
    selModGrid.setCanSort(true);
    selModGrid.setModalEditing(true);
    selModGrid.setCanFreezeFields(true);
    selModGrid.setSelectionType(SelectionStyle.SINGLE);
    selModGrid.setShowFilterEditor(true);

    My DataSource type GWT-RPC DataSource.

    Linux : Fedora 14
    firefox : 3.6.13
    Gwt : 2.1.1

    As always any help is greatly appreciated.

    Thanks.

    #2
    A field must be present in the DataSource in order to allow filtering, so it seems like you just need to add this field to your DataSource.

    Comment


      #3
      Hi,

      Actually if I wanted to filter on this field at FilterEditor but this is not the case:

      The field is not present in the DataSource but I gain criterion
      overall to bring the data in the listgrid.

      In the example you could find that "modele_nul" area is "Nuls : sans"
      This field is present in Criteria but not in DataSource field

      Before (smartgwt-2.3 revision.1541) this does not pose a problem in a local
      filtering, FilterEditor should not consider field not present in the
      DataSource but only ListGrid

      I can work around the problem by adding the field in my DataSource
      and allimenter by:

      selModGrid.addDataArrivedHandler (new DataArrivedHandler () {
      public void onDataArrived (DataArrivedEvent event) {
      listGridRecord.setAttribute ("modele_nul", _criteria_map.get("modele_nul"));
      }
      });

      This is to avoid unnecessary to bring back data from the server (trafic)

      As always any help is greatly appreciated.

      Thanks.
      Attached Files

      Comment


        #4
        Is the following correct: You are providing criteria to filterData that refers to a field which is not declared in the DataSource and not shown in the grid. You want this criteria to be sent to the server but you also want to be ignored for any client-side filter operations (all records should match)?

        Comment


          #5
          Yes it is exactly, I think it was the behavior before smartgwt-2.3 revision.1541
          is correct ?

          Thanks.

          Comment


            #6
            We're not seeing that there's been a change in behavior here.

            If you go to the Adaptive Filter sample and use fetchData() call to specify criteria for a field that doesn't existing in the DataSource, the criteria is sent to the server, and whatever records are returned are shown. This continues to be the case if you enter additional criteria in other fields (the criteria for a field that doesn't exist never causes data to be eliminated).

            If you think there's been a behavior change, please show a minimal standalone test case that reproduces the problem.

            Comment

            Working...
            X