sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/core/routing/History"
], function(Controller, History) {
"use strict";
return Controller.extend("sap.xx.BaseController", {
setModel: function(oModel, sName) {
return this.getOwnerComponent().setModel(oModel, sName);
}
}sap.ui.define([
"sap/support/idod/controller/BaseController",
"sap/ui/model/json/JSONModel",
{
this._oSalesOrderModel = new JSONModel({
bShowBusy: true
Quantity: "0",
order: "0",
Customer: "0"
});
this.setModel(this._oSalesOrderModel, "SalesOrder");
}this.getModel("SalesOrder").setProperty("/Quantity", iQty);getData: function() {
this.getModel().read("/SalesOrder", { "this is odata entityset name
filters: [new sap.ui.model.Filter("Dummy", "EQ", "Counts")],
success: function(oData) {
this._assginUpdteDelay(oData.results);
this.getModel("oSalesOrder").setProperty("/bShowBusy", false);
}.bind(this),
error: function(response) {
this.getModel("oSalesOrder).setProperty("/bShowBusy", false);
}.bind(this)
});
},
_assginUpdteDelay: function(oArray) {
this.getModel("SpcBcI7").setProperty("/DelayedInc", oArray.slice(3));
var i = 0;
while (i < Math.min(oArray.length, 3)) {
if (oArray[i].Filter === "bc") {
this.getModel("oUpdateDelay").setProperty("/BC", oArray[i].Failedlines);
} else if (oArray[i].Filter === "spc") {
this.getModel("oUpdateDelay").setProperty("/SPC", oArray[i].Failedlines);
} else if (oArray[i].Filter === "i7") {
this.getModel("oUpdateDelay").setProperty("/I7", oArray[i].Failedlines);
}
i++;
}
}
});this.setModel(new JSONModel({
"DelayedInc": []
}), "YBB");this.setModel(new JSONModel({
"DelayedInc": [],
selectedLab: "(BC->I7)",
colorChar: "",
status_s: "Status(BC)",
status_t: "Status(LP)",
status_p: "Status(PB)",
switcher: true,
pointer: ""
}), "Updatedelay");AllDelayedInc: [],
this.AllDelayedInc = this.getModel("YBB").getData().DelayedInc;this.getModel("Updatedelay").setProperty("/status_s", "Status USA");//Model Binding View Element
<columns>
<Column minScreenWidth="Tablet" demandPopin="true" width="15em">
<Text text="{Updatedelay>/pointer}"/>
</Column>
<Column minScreenWidth="Tablet" demandPopin="true" width="10%">
<Text text="{Updatedelay>/status_s}"/>
</Column>You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 16 | |
| 12 | |
| 11 | |
| 9 | |
| 9 | |
| 9 | |
| 9 | |
| 9 | |
| 7 | |
| 7 |