Hello,
Queueing does not work in offline mode.
I'am not sure whether it is intended or not (I havent' found any restrictions in the docs) but in my understanding, there should be no reason for disabling queueing in offline mode.
Example:
Just press "Clickme" and you will see "WARN:Log:Data cannot be saved because you are not online" on the console.
SmartClient Version: v11.1p_2018-07-14/LGPL Development Only (built 2018-07-14)
Queueing does not work in offline mode.
I'am not sure whether it is intended or not (I havent' found any restrictions in the docs) but in my understanding, there should be no reason for disabling queueing in offline mode.
Example:
Code:
public class dummyModule implements EntryPoint { public Canvas getViewPanel() { RestDataSource dummyDS = new RestDataSource(); DataSourceField itemIdDsField = new DataSourceField("itemID", FieldType.TEXT); itemIdDsField.setPrimaryKey(true); DataSourceField itemNameDsField = new DataSourceField("itemName", FieldType.TEXT); DataSourceField unitCostDsField = new DataSourceField("unitCost", FieldType.TEXT); dummyDS.setFields(itemIdDsField, itemNameDsField, unitCostDsField); dummyDS.setDataURL("http://127.0.0.1:8888/dummyData.jsp"); dummyDS.setUseOfflineStorage(true); final ListGrid grid = new ListGrid(); grid.setWidth(400); grid.setHeight(250); grid.setDataSource(dummyDS); grid.setAutoFetchData(true); grid.setCanEdit(true); HLayout hLayout = new HLayout(); hLayout.setMembers(grid); VLayout layout = new VLayout(10); final IButton offonButton = new IButton("Clickme", new ClickHandler() { @Override public void onClick(ClickEvent event) { RPCManager.startQueue(); Offline.goOffline(); dummyDS.addData(new Record()); } }); layout.setMembers(hLayout, offonButton); layout.setAutoHeight(); return layout; } public void onModuleLoad() { getViewPanel().draw(); } }
SmartClient Version: v11.1p_2018-07-14/LGPL Development Only (built 2018-07-14)
Comment