A controller is a JavaScript file that contains the logic for a view.
/** * Simple Controller. */ sap.ui.define(['pks/ui5strap/viewer/Controller'], function(Controller){ "use strict"; var controllerImpl = { /** * Called when the view has been initialized. */ onInit : function(){ } }; //Return constructor return Controller.extend("mycompany.helloworld.controller.SimpleController", controllerImpl); });
<!-- Simple View --> <sapUiCoreMvc:View controllerName="mycompany.helloworld.controller.SimpleController" xmlns="pks.ui5strap.bs3" xmlns:sapUiCoreMvc="sap.ui.core.mvc" xmlns:data="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"> <!-- START Page Content --> <!-- END Page Content --> </sapUiCoreMvc:View>
© 2013 - 2023 PKSoftware.de