Announcement

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

    #16
    Previous version:
    http://www.smartclient.com/builds/SmartGWT/2.x/LGPL/2010-09-20

    Last test version:
    http://www.smartclient.com/builds/SmartGWT/2.x/LGPL/2010-09-22

    I've figured out that speed problem is probably because of summary fields. On clean ListGrid it worked like before (after several cache cleaning).
    On ListGrid with summary fields one fetch generates many warnings on console:
    Code:
    17:20:20.265:XRP1:WARN:ListGrid:isc_ListGrid_0:Unable to show summary values - dataset not completely loaded
    com.smartgwt.client.core.JsObject$SGWT_WARN: 17:20:20.265:XRP1:WARN:ListGrid:isc_ListGrid_0:Unable to show summary values - dataset not completely loaded
    On compiled version the slow down is visible but much less that on Development Mode where it's significant.

    Second problem (filter disappearing) is visible after clicking filter icon or immediately when field has setFilterOnKeypress(true).

    Last exception throws down on this code:
    Code:
    DeferredCommand.addCommand(new Command() {
      @SuppressWarnings("deprecation")
       public void execute() {
          Date d = new Date();
          d.setDate(1);
          AdvancedCriteria[] criteria = {
             new AdvancedCriteria("date_init", OperatorId.GREATER_OR_EQUAL , d)
    						};
          listGrid.setFilterEditorCriteria(new AdvancedCriteria(OperatorId.AND, criteria));
       listGrid.fetchData(listGrid.getFilterEditorCriteria());
       }					
    });

    Comment


      #17
      This post has new information that was never mentioned before. We cannot magically know what you're doing unless you provide all information. setFilterOnKeypress(true) was never mentioned in your earlier post claiming that things were not working as the earlier build. So instead of posting snippets of additional code please construct a complete standalone testcase with all the necessary code to replicate any issue you claim to have discovered.

      Comment


        #18
        Originally posted by smartgwt.dev
        This post has new information that was never mentioned before. We cannot magically know what you're doing unless you provide all information. setFilterOnKeypress(true) was never mentioned in your earlier post claiming that things were not working as the earlier build. So instead of posting snippets of additional code please construct a complete standalone testcase with all the necessary code to replicate any issue you claim to have discovered.
        Yes I haven't mentioned this before because I've checked with this option and without it. In all cases same problems appeared exactly when actual filtering should occur.
        So with this option enabled after choosing date and clicking OK on date range dialog window and without this option after clicking filter icon(on the right) or pressing enter on any other field.
        Sorry for misleading.
        I know you can't read my mind. ;)
        Best regards
        Mariusz Goch

        Comment


          #19
          Ok. After reading a lot of other threads and original SmartClient docs I've limited my problems to two major.

          1. How to set initial filter editor values to date field?
          I've got DataSourceDateTimeField in my DataSource connected to ListGrid.
          All of it works almost fine. Also with relative dates witch was corrected recently. After initializing I can apply date range and correct filtered data are loaded.
          But I cannot apply any initial criteria and tried several ways.
          On versions prior to:
          http://www.smartclient.com/builds/SmartGWT/2.x/LGPL/2010-09-14
          worked something like this:
          Code:
          Date d = new Date();
          d.setDate(1);
          AdvancedCriteria[] criteria = {
             new AdvancedCriteria("date_init", OperatorId.GREATER_OR_EQUAL , d)
          };
          listGrid.setFilterEditorCriteria(new AdvancedCriteria(OperatorId.AND, criteria));
          On latest nightly builds I've got this error:
          Code:
          14:54:33.204:MUP0[E]:WARN:ListGrid:isc_ListGrid_0:Advanced criteria includes criteria for field:date_init with operator between. Unable to display this type of criteria in the filter edi
          I've tried several others operators that could accomplish such filtering but with no success.
          How can I set such criteria?

          2. Second problem concerns combining date criteria with any other.
          After selecting date range and clicking filter icon right data is loaded(so right criteria is being send to server) but edit field (with selection icon) is being cleared out.
          After that any attempts to apply other filters end up without any range criteria.
          By any other criteria I mean editing any other item generated as automated filter editor criteria.
          So you can use date range filter or others but you cannot use them together.

          Beside that I've discovered some problems on showcase:
          Code:
          http://www.smartclient.com/smartgwt/showcase/#grid_daterange_filtering
          On lower example date filtering doesn't work at all.

          Thanks for any help.
          Best regards
          Mariusz Goch

          Comment


            #20
            Please try the latest build, and if you're still having a problem show a *complete* standalone test case that reproduces the issue.

            Comment


              #21
              I've used latest nightly build from:
              http://www.smartclient.com/builds/SmartGWT/2.x/LGPL/2010-09-24

              Complete test case:
              Code:
              VLayout mainLayout = new VLayout(12);
              DataSource ds = new DataSource();
              ds.setDataURL("country.data.xml");
              ds.setRecordXPath("/List/country");
              ds.addField(new DataSourceTextField("area"));
              ds.addField(new DataSourceDateTimeField("independence"));
              
              ListGrid listGrid = new ListGrid();
              listGrid.setWidth100();
              listGrid.setHeight100();
              listGrid.setDataSource(ds);
              listGrid.setAutoFetchData(true);
              listGrid.setShowFilterEditor(true);
              		
              mainLayout.addMember(listGrid);
              Data file used in this scenario for simplicity was taken from smartgwt showcase:
              Code:
              http://www.smartclient.com/smartgwt/showcase/ds/test_data/world.data.xml
              Scenario running on Development Mode:
              1. Choose any date in range filter editor for field "independence". Could be any specific date, for example: 01/01/1900 in from field.
              2. Click OK
              Correct date range appears on the filter editor on top of list grid.
              3. Click "filter" icon on the right up corner of the list grid.
              Data is filtered correctly but filter editor for "independence" is cleared and following errors appears on console:
              Code:
              19:00:17.669:MUP9:WARN:ListGrid:isc_ListGrid_0:Advanced criteria includes criteria for field:independence with operator greaterOrEqual. Unable to display this type of criteria in the filter editor.
              4. Edit filter editor for "area" field.
              5. Click filter icon.
              Data is filtered only with "area" criteria and without "independence" field range.

              Because of the same error that appeared during test setting initial criteria this test case should cover all the earlier mentioned problems.

              All was tested on:
              Firefox (Development Mode) Linux x64
              Google Chrome (compiled version) Linux X64
              IE9 (compiled version) Windows XP

              By the way in latest nightly appeared new bug. Some of the controls doesn't appear at all and new smartgwt windows fail to show with errors like this:
              Code:
              19:16:43.949:WARN:SubmitItem:isc_SubmitItem_1:CanvasItem: isc_SubmitItem_0 defined with no canvas property - creating a default canvas for this item.
              com.smartgwt.client.core.JsObject$SGWT_WARN: 19:16:43.949:WARN:SubmitItem:isc_SubmitItem_1:CanvasItem: isc_SubmitItem_0 defined with no canvas property - creating a default canvas for this item.
              Best regards
              Mariusz Goch

              Comment


                #22
                Several further changes made today should resolve this. Download the next nightly build and let us know if you still see any problems.

                Comment


                  #23
                  Hi,

                  I've just checked latest nightly and finally it works fine :)
                  Thanks very much.
                  There is still one little problem that you cannot set initial fetch criteria to be displayed correctly on filter editor. I've tried using setInitialCriteria() and setFilterEditorCriteria(). Data are fetch with correct filters but they are not visible on filter editor. But this may be problem that I'm trying to set them before initialization.
                  Setting those criteria in a DeferredCommand works fine so it's good enough for me. :)
                  Thanks very much.
                  Great work.
                  Mariusz Goch

                  Comment


                    #24
                    We've just added a change that should resolve the issue where initialCriteria don't show up in the filterEditor. If you want to avoid the DeferredCommand, please give it a try with the next nightly build and let us know if you still see problems

                    Thanks

                    Comment


                      #25
                      On latest nightly (2010-09-28) problem still exists and workaround with DefferedCommand is needed.
                      Unless you meant another nightly. So I will check tomorrow.
                      Best regards.

                      Comment


                        #26
                        Yes - the *next* nightly (the 29th or above)

                        Comment


                          #27
                          This DatePicker is driving me mad. New version new problems.
                          First of all a problem with initial criteria was solved.
                          You can now apply advanced criteria with date range just by setInitialCriteria(). Data is loaded with correct filters and correct information is displayed on filter component.
                          But for now that's the only thing that works.
                          Any actions going towards changing date range criteria ends up with following error:
                          Code:
                          11:54:21.087:MUP2:WARN:Log:TypeError: this.parseDataType is not a function
                              FormItem.mapDisplayToValue(_1=>{Obj})
                              FormItem._updateValue({Obj})
                              MiniDateRangeItem.updateValue(_1=>{Obj})
                              MiniDateRangeItem.rangeDialogCallback(_1=>{Obj})
                              anonymous({Obj})
                              [c]Class.fireCallback(_1=>"isc_MiniDateRangeItem_0.rangeDialogCall..."[ 52],  _2=>"value",  _3=>[object Array],  _4=>{Obj},  _5=>undef)
                              [c]Class.fireCallback(_1=>"isc_MiniDateRangeItem_0.rangeDialogCall..."[ 52],  _2=>"value",  _3=>[object Array])
                              DateRangeDialog.finished({Obj})
                              DateRangeDialog.accept()
                              unnamed({Obj}, undef)
                              StatefulCanvas.handleActivate({Obj}, undef)
                              StatefulCanvas.handleClick({Obj}, undef)
                              [c]EventHandler.bubbleEvent(_1=>{Obj},  _2=>"click")
                              [c]EventHandler.handleClick(_1=>{Obj})
                              EventHandler._handleMouseUp([object MouseEvent], undef)
                              [c]EventHandler.handleMouseUp(_1=>[object MouseEvent])
                              [c]EventHandler.dispatch(_1=>isc_c_EventHandler_handleMouseUp,  _2=>[object MouseEvent])
                              anonymous([object MouseEvent])
                              unnamed()
                          For example it appears on:
                          1. Trying to click OK on date time picker range dialog.
                          2. Trying to apply a date by date chooser (window does not disappear with clicks on any date or today button).
                          All was checked on several ListGrid configurations and also with very simple one with only one DateTimeField - test case post before.
                          Code:
                          DataSource ds = new DataSource();
                          ds.setDataURL("country.data.xml");
                          ds.setRecordXPath("/List/country");
                          ds.addField(new DataSourceTextField("area"));
                          ds.addField(new DataSourceDateTimeField("independence"));
                          
                          ListGrid listGrid = new ListGrid();
                          listGrid.setWidth100();
                          listGrid.setHeight100();
                          listGrid.setDataSource(ds);
                          listGrid.setAutoFetchData(true);
                          listGrid.setShowFilterEditor(true);
                          
                          mainLayout.addMember(listGrid);
                          Best regards
                          Mariusz Goch

                          Comment


                            #28
                            A new build has been kicked off with the fix and will be available in 4-5 hours.

                            Comment


                              #29
                              Ok. It's great.
                              I've tested some scenarios and for now all works great.
                              Thanks. Great job.
                              Best regards
                              Mariusz Goch

                              Comment

                              Working...
                              X