Announcement

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

    5.1p BatchUploader doesn't remove all successful added records from GUI after commit

    Hi Isomorphic,

    please see this testcase where after adding the records the uploadGrid is not cleared even though the adding was successful. The BatchUploader uses PartialCommitOption.RETAIN.

    Testcase (using v10.1p_2016-04-21):
    BuiltInDS.java:
    Code:
    package com.smartgwt.sample.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.Version;
    import com.smartgwt.client.core.KeyIdentifier;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.types.PartialCommitOption;
    import com.smartgwt.client.util.Page;
    import com.smartgwt.client.util.PageKeyHandler;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.BatchUploader;
    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.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(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")");
            w.setTitle("TITLE" + w.getTitle());
            w.setShowMinimizeButton(false);
            w.setIsModal(true);
            w.setShowModalMask(true);
            w.centerInPage();
    
            final BatchUploader bu = new BatchUploader();
            bu.setUploadDataSource(DataSource.get("supplyItem"));
            bu.setPartialCommit(PartialCommitOption.RETAIN);
            w.addItem(bu);
            w.show();
        }
    }
    supplyItemTest.csv
    Code:
    "nextShipment","category","itemName","itemID","unitCost","description","SKU","inStock","units"
    "2009-01-21","Audio","Small grey widget",,0.41,"Desc A","545315","","Ea"
    "","String","Small red widget",,0.58,"","190000","","Ea"
    "2014-11-17","String","Small piece of string",,0.22,"","90600","","Ea"
    "2012-03-11","String","More string",,0.58,"","1900111","","Roll"
    "2009-01-21","Audio","Small grey widget",,0.41,"Desc A","545315","","Ea"
    "","String","Small red widget",,0.58,"","190000","","Ea"
    "2014-11-17","String","Small piece of string",,0.22,"","90600","","Ea"
    "2012-03-11","String","More string",,0.58,"","1900111","","Roll"
    "2009-01-21","Audio","Small grey widget",,0.41,"Desc A","545315","","Ea"
    "","String","Small red widget",,0.58,"","190000","","Ea"
    "2014-11-17","String","Small piece of string",,0.22,"","90600","","Ea"
    "2012-03-11","String","More string",,0.58,"","1900111","","Roll"
    "2009-01-21","Audio","Small grey widget",,0.41,"Desc A","545315","","Ea"
    "","String","Small red widget",,0.58,"","190000","","Ea"
    "2014-11-17","String","Small piece of string",,0.22,"","90600","","Ea"
    "2012-03-11","String","More string",,0.58,"","1900111","","Roll"
    "2009-01-21","Audio","Small grey widget",,0.41,"Desc A","545315","","Ea"
    "","String","Small red widget",,0.58,"","190000","","Ea"
    "2014-11-17","String","Small piece of string",,0.22,"","90600","","Ea"
    "2012-03-11","String","More string",,0.58,"","1900111","","Roll"[B][/B]


    Screenshot after "Commit":

    Click image for larger version

Name:	BatchUploader leaves records in GUI.png
Views:	43
Size:	10.1 KB
ID:	237335
    It seems, for this file it are always these 8 records that are not removed.


    This is an important one for me.

    Best regards
    Blama

    #2
    Thanks for the notification.
    We've made a change to address this issue. Please try the next nightly build dated April 26 or above

    Regards
    Isomorphic Software

    Comment


      #3
      Hi Isomorphic,

      that was fast, thanks. I'll try the new version tomorrow.

      Best regards
      Blama

      Comment


        #4
        Hi Isomorphic,

        this is working for me with the testcase. I will double check in my application tomorrow.

        Best regards
        Blama

        Comment

        Working...
        X