Fiori 出试(WEBIDE平台)day1
生活随笔
收集整理的這篇文章主要介紹了
Fiori 出试(WEBIDE平台)day1
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
剛開始學習ui5的開發,好多語法還不是很懂。
<mvc:View controllerName="com.example.wizard.BookExample_Wizard.controller.View1" xmlns:mvc="sap.ui.core.mvc"
xmlns:layout="sap.ui.layout"xmlns:form="sap.ui.layout.form"xmlns:core="sap.ui.core"xmlns="sap.m"><App><NavContainer id="wizardNavContainer"><pages><Page title="new prodect"><content><Wizard complete="onWizardComplete"><WizardSteptitle="Basic Information"icon = "sap-icon://product"><form:SimpleForm editable="true"><Label text="Name" required="true"/><Input value="{/Name}"placeholder="A short name"/><Label text="Description" required="true"/><Input value="{Description}"placeholder="One-sentence description"/><Label text="Date Avail. for Sale"/><DatePicker value="{/SellDate}"/><Label text="Unit Price" required="True"/><Input value="{/Price}" type="Number"placeholder="Starting price"/></form:SimpleForm></WizardStep><WizardStep title="Product Physical Information"icon="sap-icon://database"><form:SimpleForm editable="true"><Label text="Height (inches)"/><Input value="{/Height}"placeholder="Includes regular packing"/><Label text="Weight (ounces)"/><Input value="{/Weight}"placeholder="Includes regular packing"/><Label text="Department"/><ComboBox id="departmentCombo"change="onComboChange"><core:Item key="01" text="Electronics"/><core:Item key="02" text="Toys"/></ComboBox><Label text="Merchandising"/><VBox><RadioButtonGroup select="onRadionChange"><RadioButton text="Display on shelf"/><RadioButton text="Freestanding"/></RadioButtonGroup></VBox></form:SimpleForm></WizardStep><WizardSteptitle="Supplier Information"icon="sap-icon://supplier"><form:SimpleForm editable="true"><Label text="Name"/><Input value="{/SupplierName}"/><Label text="Street"/><Input value="{SupplierStreet}"placeholder="123 Main St."/><Label text="City/State/Zip"/><Input value="{SupplierState}"placeholder="IL"/><Input value="{/SupplierZip}"placeholder="60176" type="Number"/></form:SimpleForm></WizardStep></Wizard> </content></Page></pages></NavContainer></App> </mvc:View> sap.ui.define(["sap/ui/core/UIComponent","sap/ui/Device","com/example/wizard/BookExample_Wizard/model/models" ], function (UIComponent, Device, models) {"use strict";return UIComponent.extend("com.example.wizard.BookExample_Wizard.Component", {metadata: {manifest: "json"},/*** The component is initialized by UI5 automatically during the startup of the app and calls the init method once.* @public* @override*/init: function () {// call the base component's init functionUIComponent.prototype.init.apply(this, arguments);// enable routingthis.getRouter().initialize();// set the device modelthis.setModel(models.createDeviceModel(), "device");},onshit:function(){this.model = new sap.ui.model.json.JSONModel();this.getView().setModel(this.model);//Add the review page to the nav contanier//This way, when onwizardcomplete is invoked,//we simple use to.() method to have the review page show upthis.oNavContainer=this.getView().byId("wizardNavContainer");this.wizardReviewPage =sap.ui.xmlfragment("com.example.wizarddBookExample_Wizard.view.Review",this);this.oNavContainer.addPage(this.wizardReviewPage);}}); });
<mvc:View controllerName="com.example.wizard.BookExample_Wizard.controller.View1" xmlns:mvc="sap.ui.core.mvc"
xmlns:layout="sap.ui.layout"xmlns:form="sap.ui.layout.form"xmlns:core="sap.ui.core"xmlns="sap.m"><App><NavContainer id="wizardNavContainer"><pages><Page title="new prodect"><content><Wizard complete="onWizardComplete"><WizardSteptitle="Basic Information"icon = "sap-icon://product"><form:SimpleForm editable="true"><Label text="Name" required="true"/><Input value="{/Name}"placeholder="A short name"/><Label text="Description" required="true"/><Input value="{Description}"placeholder="One-sentence description"/><Label text="Date Avail. for Sale"/><DatePicker value="{/SellDate}"/><Label text="Unit Price" required="True"/><Input value="{/Price}" type="Number"placeholder="Starting price"/></form:SimpleForm></WizardStep><WizardStep title="Product Physical Information"icon="sap-icon://database"><form:SimpleForm editable="true"><Label text="Height (inches)"/><Input value="{/Height}"placeholder="Includes regular packing"/><Label text="Weight (ounces)"/><Input value="{/Weight}"placeholder="Includes regular packing"/><Label text="Department"/><ComboBox id="departmentCombo"change="onComboChange"><core:Item key="01" text="Electronics"/><core:Item key="02" text="Toys"/></ComboBox><Label text="Merchandising"/><VBox><RadioButtonGroup select="onRadionChange"><RadioButton text="Display on shelf"/><RadioButton text="Freestanding"/></RadioButtonGroup></VBox></form:SimpleForm></WizardStep><WizardSteptitle="Supplier Information"icon="sap-icon://supplier"><form:SimpleForm editable="true"><Label text="Name"/><Input value="{/SupplierName}"/><Label text="Street"/><Input value="{SupplierStreet}"placeholder="123 Main St."/><Label text="City/State/Zip"/><Input value="{SupplierState}"placeholder="IL"/><Input value="{/SupplierZip}"placeholder="60176" type="Number"/></form:SimpleForm></WizardStep></Wizard> </content></Page></pages></NavContainer></App> </mvc:View> sap.ui.define(["sap/ui/core/UIComponent","sap/ui/Device","com/example/wizard/BookExample_Wizard/model/models" ], function (UIComponent, Device, models) {"use strict";return UIComponent.extend("com.example.wizard.BookExample_Wizard.Component", {metadata: {manifest: "json"},/*** The component is initialized by UI5 automatically during the startup of the app and calls the init method once.* @public* @override*/init: function () {// call the base component's init functionUIComponent.prototype.init.apply(this, arguments);// enable routingthis.getRouter().initialize();// set the device modelthis.setModel(models.createDeviceModel(), "device");},onshit:function(){this.model = new sap.ui.model.json.JSONModel();this.getView().setModel(this.model);//Add the review page to the nav contanier//This way, when onwizardcomplete is invoked,//we simple use to.() method to have the review page show upthis.oNavContainer=this.getView().byId("wizardNavContainer");this.wizardReviewPage =sap.ui.xmlfragment("com.example.wizarddBookExample_Wizard.view.Review",this);this.oNavContainer.addPage(this.wizardReviewPage);}}); });
轉載于:https://www.cnblogs.com/HARU/p/10671990.html
總結
以上是生活随笔為你收集整理的Fiori 出试(WEBIDE平台)day1的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 忘记银行卡号怎么办
- 下一篇: 南昌陆军步兵学院3年是本科吗