I have a window which contains a form with a selectItem:
When you open the window DataArrived fires as it's supposed to. If you close the parent window and then open it again (the window has the closeClick below) the dataArrived does not fire, even though there is data in it (data must have arrived). Am I not destroying it properly in the first place? I don't see anything in the logs to make me think the object is still around.
Window Close Click:
Method on another object which updates the SelectItem:
Also Tried:
Code:
{ name: "ShowFolder", title: "Folder", editorType: "select",
optionDataSource: "DSvuShowFoldersList", valueField: "ShowFolderID", displayField: "Title", pickListWidth: 250,
getPickListFilterCriteria: function() {
return { ShowID: ShowAdminShowList.selectedShow };
},
change: function(form, item, value, oldValue) {
ShowAdminAssetList.fetchData({ where: " ShowID = " + ShowAdminShowList.selectedShow + ((value == 0) ? " AND ShowFolderID IS NULL " : " AND ShowFolderID = " + value) });
},
dataArrived: function(startRow, endRow, data) {
alert("dataArrived");
var dataLength = data.getLength();
this.currentShowFolderID = 0;
if (data && data.getLength() > 0) {
var sfId = data.get(0)["ShowFolderID"];
this.setValue(sfId);
var showFolderWhere = (sfId == 0) ? " AND ShowFolderID IS NULL " : (" AND ShowFolderID = " + sfId);
var assetWhere = " ShowID = " + ShowAdminShowList.selectedShow + showFolderWhere;
ShowAdminAssetList.fetchData({ where: assetWhere });
}
},
defaultToFirstOption: true,
startRow: true,
endRow: false
},
Window Close Click:
Code:
closeClick: function(){
// CloseWindowById(this.ID);
this.destroy();
},
Code:
ShowAdminAssetFilterForm.getField("ShowFolder").fetchData({}, this.updateAssetList(), { ts: isc.timeStamp() });
Code:
ShowAdminAssetFilterForm.getField("ShowFolder").fetchData();
Comment