- SAPUI5 App Descriptor
- Async Module Definition
- Expression Binding
- Message Handling
- Smart Controls
- Flexibility Services
- Runtime Authoring
- ++Performance
- Addon: UI5 Inspector
return UIComponent.extend("sap.anz.mvc", { metadata : { manifest: "json" }, init : function () { // call the init function of the parent ... }
sap.ui.core.mvc.Controller.extend("sap.anz.controller.Master", { // instantiate every sinlge UI5 component you will need });
sap.ui.define([ "sap/ui/core/mvc/Controller" ], function (Controller) { // force strict mode for code interpretation // goal: catch mistakes, prevents 'unsafe' actions, disables 'poor' features // e.g. limit lookup scope to local and avoid global var declaration "use strict"; return Controller.extend("sap.anz.controller.Master", { // your controller logic here }); });
<!-- set data-sap-ui-bindingSyntax='complex' in bootstrap --> numberState="{= ${products>UnitPrice} > ${/priceThreshold} ? 'Error' : 'Success' }"
<!-- either escape value for '<'/'&' or modify logic --> numberState="{= ${products>UnitPrice} <= ${/priceThreshold} ? 'Success' : 'Error' }"
return UIComponent.extend("sap.anz.mvc", { metadata : { manifest: "json", handleValidation : true }...
sap.ui.getCore().getMessageManager().addMessages( new sap.ui.core.message.Message({ message: "ZIP codes must have at least 23 digits", type: sap.ui.core.MessageType.Error, target: "/input10/value", persistent: true }); );
<smartFilterBar:SmartFilterBar id="smartFilterBar" entityType="Product" persistencyKey="SmartFilterPKey"> <smartFilterBar:controlConfiguration> <smartFilterBar:ControlConfiguration key="Category" visibleInAdvancedArea="true" preventInitialDataFetchInValueHelpDialog="false"> </smartFilterBar:ControlConfiguration> </smartFilterBar:controlConfiguration> </smartFilterBar:SmartFilterBar>
<smartTable:SmartTable smartFilterId="smartFilterBar" tableType="ResponsiveTable" editable="false" entitySet="Products" useVariantManagement="true" useTablePersonalisation="true" header="Products" showRowCount="true" useExportToExcel="false" enableAutoBinding="true" persistencyKey="SmartTablePKey"> </smartTable:SmartTable>