Announcement

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

    Listgrid is loosing criteria

    Tested with smartgwt-3.1p.2013-08-10 and FF 20.0.1.
    Modified showcase: AutofitFilterSample

    Steps to reproduce:
    1.Click on fetch button to retrieve data based on initial criteria.
    2.Add new column "Country"
    3.Click on filter icon - > listgrid is doing fetch without any criteria - > Criteria are lost.

    This is not happening when you first remove "Continent" column and then add back columns "Continent" and "Country"

    Is this a bug? If yes, can you please fix it?

    Thank you
    Attached Files

    #2
    We'll have a look and let you know what we find

    Regards
    Isomorphic Software

    Comment


      #3
      We've made a change to address this issue. Please try the next nightly build, dated Aug 17 or above

      Regards
      Isomorphic Software

      Comment


        #4
        Issue is still present when using AdvancedCriteria. Simple criteria and criterion are working fine. Tested on SmartClient Version: v8.3p_2013-08-19/LGPL Development Only (built 2013-08-19).
        Please see attached modified AutofitFilterSample.

        Please, can you fix it?
        Thanks

        EDIT: also filtering is not working at all using Criterion or AdvanceCriteria.
        Attached Files
        Last edited by geletkaf; 19 Aug 2013, 05:26.

        Comment


          #5
          Just a note that this is under investigation and we'll follow up when we have more information

          Regards
          Isomorphic Software

          Comment


            #6
            The FilterEditor can not create / edit AdvancedCriteria by default.

            AdvancedCriteria are not a simple flat format - you can have multiple values applying to the same field, ambiguous operators, etc.

            It is possible to enable editing of advanced criteria in a filter editor in a couple of ways.
            One option is to enable filter expressions via "setAllowFilterExpressions(true)". From experimentation it appears that in the 3.1p branch there is a problem whereby when you initially apply the criteria to the grid they are not displayed (though once edited they behave correctly). We are investigating this.

            The other option would be to build custom FormItem instances designed for editing AdvancedCriteria and apply them via the FilterEditorProperties attribute.

            Regards
            Isomorphic Software

            Comment


              #7
              Just a quick follow up to note that this:
              Code:
               
              From experimentation it appears that in the 3.1p branch there is a problem whereby when you initially apply the criteria to the grid they are not displayed (though once edited they behave correctly). We are investigating this.
              Appears to have been due to an unrelated config issue, so this approach should work in 3.1p

              Comment


                #8
                When I use Criterion without "setAllowFilterExpressions(true)" i cannot filter data.
                When I use Criterion with "setAllowFilterExpressions(true)" i can filter data, but i have the same problem with loosing criteria on grid - > so everything is loaded.

                How can I use Criterion or AdvancedCriteria and also do not loose criteria and be able to filter data (on client) ?

                Tested with smartgwt-3.1p.2013-08-10 and FF 20.0.1.
                See modified showcase: AutofitFilterSample
                Attached Files

                Comment


                  #9
                  We'll take a look at your new sample and let you know when we have more information

                  Regards
                  Isomorphic Software

                  Comment


                    #10
                    The problem with this sample is the use of the "Criterion" object passed directly to "setCriteria()".
                    The filterData() method is expecting either an AdvancedCriteria object, or a Criteria object. A Criterion object is intended to be used as a sub-clause of an AdvancedCriteria object only and is not being understood in this context.
                    If you use an AdvancedCriteria, filtering should work, and if you set the "allowFilterExpressions" flag on your grid, this sample should start working for you.

                    Regards
                    Isomorphic Software

                    Comment


                      #11
                      Hi Isomorphic,

                      I encountered the same problem - I was handling a Criterion to ListGrid.fetchData(criteria).
                      Afterwards the FilterEditor did not process entries manually entered in the FilterEditor.

                      I looked at http://www.smartclient.com/smartgwte...ang.Boolean%29 which has some information on "filterEditor and advanced criteria". To me it wasn't clear either that the result will be different if I use a Criterion or AdvancedCriteria in fetchData(c).

                      Could you update http://www.smartclient.com/smartgwte...ta.Criteria%29 and the other overloads to show that one should not use Criterions here?

                      Is it correct to say that one should never use Criterion outside of a AdvancedCriteria?

                      Thanks,
                      Blama

                      Comment


                        #12
                        Hello,

                        I found this post again by chance. These docs confirm that one should only use Criterion as part of AdvancedCriteria and never on its own.

                        Best regards
                        Blama

                        Comment

                        Working...
                        X