FPM - Floorplan Manager
{ "Responsibility": [ { "id": 0,
"type": "none"
}, {
"id": 1,
"type": "responsible"
},
{
"id": 2,
"type": "backup"
}
] }
control:UIComponent (Component.js) | +-- view:App (view/App.view.xml) | +-- control:SplitApp | +-- aggregation:masterPages | | | +-- view:Master (view/Master.view.xml) | | | +-- controller: Master (view/Master.controller.js) | +-- aggregation:detailPages | +-- view:Detail (view/Detail.view.xml) | | | +-- controller:Detail (view/Detail.controller.js) | +-- view:NotFound (view/NotFound.view.xml) | +-- view:AddProduct (view/AddProduct.view.xml) | +-- controller:AddProduct (view/AddProduct.controller.js)
JSON model
XML model
Resource model - hlavne pre preklad
jeden hlavny model na aplikaciu
dalsie modely vo vlastnej "oblasti"
var url = "/proxy/http/<server>:<port>/sap/opu/odata/sap/ZGWSAMPLE_SRV/";
var oModel = new sap.ui.model.odata.ODataModel(url, true, "<user>", "<password>");
var oModel = new sap.ui.model.json.JSONModel("http://172.27.10.43/app/files/data.php");
var deviceModel = new sap.ui.model.json.JSONModel({
isPhone: sap.ui.Device.system.phone,
isNoPhone: ! sap.ui.Device.system.phone,
listMode: (sap.ui.Device.system.phone) ? "None" : "SingleSelectMaster",
listItemType: (sap.ui.Device.system.phone) ? "Active" : "Inactive"
});
oView.setModel(oModel);
oView.setModel(deviceModel, "device");
oView instanceof sap.ui.core.mvc.JSViewvar i18nModel = new sap.ui.model.resource.ResourceModel({
bundleUrl: "i18n/i18n.properties"
});
oView.setModel(i18nModel, "i18n");
DomainsTitle=Domains
UsersTitle=Users
Persons=Persons
AddDomain=Add Domain
EditDomain=Edit Domain
DomainsTitle=Domény
UsersTitle=Užívatelia
Persons=Osoby
AddDomain=Pridať doménu
EditDomain=Upraviť doménu
i18n.propertiesi18n_sk_SK.properties<List
id="list"
mode="{device>listMode}">
<items>
<StandardListItem
title="{i18n>DomainsTitle}"
type="Navigation"
press="handleDomains"
/>
<StandardListItem
title="{i18n>UsersTitle}"
type="Active"
press="handleUsers"
/>
</items>
</List>
<List
id="list"
mode="{ui>/listMode}"
delete="handleDelete"
select="handleListSelect"
items="{/Data}">
<StandardListItem
title="{name}"
type="Active"
press="handleListItemPress">
</StandardListItem>
</List>
onInit();
onExit();
onAfterRendering();
onBeforeRendering()
jQuery.sap.require("sap.m.MessageToast");
sap.ui.controller("tst.view.master.Master", {
handleDelete: function(e) {
var oItem = e.getParameter("listItem");
e.getSource().removeItem(oItem);
sap.m.MessageToast.show("Domain was deleted.");
}
});
+---app | +---adminer | \---files +---assets | +---css | +---img | \---js +---i18n +---libs | +---dibi | \---tracy +---model +---resources +---util |---view | +---detail | +---fragments | \---master | +---Component.js \---index.html
Substitution