Announcement

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

    5.1p sortByField + grouping not working

    Hi Isomorphic,

    please see this v10.1p_2015-12-18/PowerEdition BuiltInDS-based testcase:

    BuiltInDS.java:
    Code:
    package com.smartgwt.sample.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.core.KeyIdentifier;
    import com.smartgwt.client.data.AdvancedCriteria;
    import com.smartgwt.client.data.Criterion;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.types.OperatorId;
    import com.smartgwt.client.util.Page;
    import com.smartgwt.client.util.PageKeyHandler;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.IButton;
    import com.smartgwt.client.widgets.Window;
    import com.smartgwt.client.widgets.events.ClickEvent;
    import com.smartgwt.client.widgets.events.ClickHandler;
    import com.smartgwt.client.widgets.grid.ListGrid;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    public class BuiltInDS implements EntryPoint {
        private VLayout mainLayout;
        private IButton recreateBtn;
    
        public void onModuleLoad() {
            KeyIdentifier debugKey = new KeyIdentifier();
            debugKey.setCtrlKey(true);
            debugKey.setKeyName("D");
    
            Page.registerKey(debugKey, new PageKeyHandler() {
                public void execute(String keyName) {
                    SC.showConsole();
                }
            });
    
            mainLayout = new VLayout(20);
            mainLayout.setWidth100();
            mainLayout.setHeight100();
    
            recreateBtn = new IButton("Recreate");
            recreateBtn.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    recreate();
                }
            });
            mainLayout.addMember(recreateBtn);
            recreate();
            mainLayout.draw();
        }
    
        private void recreate() {
            Window w = new Window();
            w.setWidth("95%");
            w.setHeight("95%");
            w.setMembersMargin(0);
            w.setModalMaskOpacity(70);
            w.setTitle("Sorting by other fields when grouping");
            w.setShowMinimizeButton(false);
            w.setIsModal(true);
            w.setShowModalMask(true);
            w.centerInPage();
    
            ListGrid supplyItem = new ListGrid(DataSource.get("supplyItem"));
            supplyItem.setCanGroupBy(true);
            supplyItem.setCanSort(true);
            supplyItem.setInitialCriteria(new AdvancedCriteria(new Criterion("itemName", OperatorId.STARTS_WITH, "Acc")));
            supplyItem.setAutoFetchData(true);
    
            w.addItem(supplyItem);
            w.show();
        }
    }
    supplyItem.ds.xml:
    Code:
    Please add this to field "itemName" in supplyItem.ds.xml: [B]sortByField="description"[/B]
    • After startup, click "Item"-Header (1st column) twice to sort by the itemName-field (which uses the description data) descending.
    • This is working as expected.
    • Now right-click "Category"-header to group by it.
    • See that now on click of the "Item"-Header, the itemName-value is used to sort instead of the expected description-value.
    Could you fix it? I'd really like to use the new feature.

    Thank you & Best regards
    Blama

    EDIT: Tested in GC47 Compiled and FF26 Dev Mode

    #2
    We'll check this out. Probably a pretty straightforward fix.

    Comment


      #3
      Hi Isomorphic,

      thanks, that's great to hear. I added another bug in the Grouped-ListGrid-sorting area.

      Best regards
      Blama

      Comment


        #4
        Hi Isomorphic,

        do you have any update on the two issues from #1 and #3? Can you reproduce?

        Best regards
        Blama

        Comment


          #5
          Still under investigation - we should have an update for you soon.

          Regards
          Isomorphic Software

          Comment


            #6
            We've made a change to address this issue. Please try the next nightly build, dated January 8.

            Regards
            Isomorphic Software

            Comment


              #7
              Hi Isomorphic,

              this is working as expected with the testcase and v10.1p_2016-01-08/PowerEdition Deployment.
              I'll test with my application on the weekend.

              Thank you & Best regards
              Blama

              Comment

              Working...
              X