Hi,
I am trying to htmlPane.show() a message during long data operations and htmlPane.hide() when complete.
I can actuate the htmlPane.show()/htmlPane.hide() methods using buttons, but am not able to show/hide in the body of the dataChanged: function (operationType) {}.
Why does this work with buttons, but not in a function? I also tried to actuate the click event of the buttons within the function, but that did not work either.
Here is my code:
Any help would be appreciated!!
Mike
I am trying to htmlPane.show() a message during long data operations and htmlPane.hide() when complete.
I can actuate the htmlPane.show()/htmlPane.hide() methods using buttons, but am not able to show/hide in the body of the dataChanged: function (operationType) {}.
Why does this work with buttons, but not in a function? I also tried to actuate the click event of the buttons within the function, but that did not work either.
Here is my code:
Code:
isc.RestDataSource.create({
ID: "shopMdSource",
fields: [
{ name: "id", title: "Id", primaryKey: true, canEdit: false, hidden: true },
{ name: "key", title: "Customer Tag", length: 30, type: "text" },
{ name: "namespace", title: "Namespace", hidden: true },
{ name: "value", title: "Initial Case Quantity", hidden: true },
{ name: "value_type", title: "value_type", hidden: true },
{ name: "description", title: "Description", hidden: true },
{ name: "owner_id", title: "owner_id", hidden: true },
{ name: "created_at", title: "created_at", hidden: true },
{ name: "updated_at", title: "updated_at", hidden: true },
{ name: "owner_resource", title: "owner_resource", hidden: true },
{ name: "admin_graphql_api_id", title: "admin_graphql_api_id", hidden: true }
],
dataFormat: "json",
promptStyle: "modal",
fetchDataURL: "/listSMF",
addDataURL: "/createSMF",
updateDataURL: "/updateSMF",
removeDataURL: "/removeSMF"
});
isc.HTMLPane.create({
ID: "busyMessage1", height:110, showEdges:true, builderAutoID: true, autoDraw: false,
contents: "<strong><table bgcolor='#B7ECEC' style=' margin: 0; border-radius: 25px;'><tr><td style='padding: 15px; padding-bottom: 0px;'><img src='/progressCursorTracker.gif'> Updating Product Data...</td></tr><tr><td style='padding: 15px;'>This may take a while if you have a lot of Products...</td></tr></table></strong>",
contentsType: "fragment",
evalScriptBlocks:true,
captureSCComponents:true,
disabled:false,
visibility:"hidden"
})
var reloadPage = false;
isc.ListGrid.create({
ID: "shopMdListGrid",
width: 500, height: 224,
//emptyCellValue: "--",
loadingDataMessage: "<strong><table bgcolor='#B7ECEC' style='border-radius: 25px;'><tr><td style='padding: 15px; padding-bottom: 0px;'>${loadingImage} Loading Data</td></tr><tr><td style='padding: 15px;'>This may take a while if you have a lot of Customer Tags...</td></tr></table></strong>",
loadingDataMessage: "<strong><table bgcolor='#B7ECEC' style='border-radius: 25px;'><tr><td style='padding: 15px; padding-bottom: 0px;'>${loadingImage} Loading Data</td></tr><tr><td style='padding: 15px;'>This may take a while...</td></tr></table></strong>",
alternateRecordStyles: true,
headerBackgroundColor: "#43467F",
dataSource: shopMdSource,
sortField: 0, // sort by key
dataPageSize: 50,
autoDraw: false,
builderAutoID: true,
autoFetchData: true,
autoSaveEdits: true,
dataChanged: function (operationType) {
//alert(operationType);
//isc.logWarn("dataArrived: ");
[B] busyMessage1.show();[/B]
columnsUpdated = false;
//shopProdListGrid.invalidateCache();
//Remove LG from VL
shopProdManagerVL.removeMember(shopProdListGrid);
//Destroy LG
shopProdListGrid.destroy();
//Destroy DS
shopProdRestDataSource.destroy();
//Instantiate DS
var theProdFields = [...prodFields]; //copy the static product fields prototype to the working copy
isc.RestDataSource.create(shopProdRestDataSourceParms);
//Instantiate LG
isc.ListGrid.create(shopProdListGridParms);
//Add LG to VL in the second position
shopProdManagerVL.addMember(shopProdListGrid, 1);
[B] busyMessage1.hide();[/B]
},
});
Mike
Comment