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:
supplyItemTest.csv
Screenshot after "Commit":
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
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(); } }
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":
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
Comment