├── .gitignore
├── LICENSE
├── LICENSES
└── Apache-2.0.txt
├── README.md
├── REUSE.toml
├── btp-samples-cdm-multiple-apps
├── README.md
├── app1
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── ui5-deploy.yaml
│ ├── ui5-local.yaml
│ ├── ui5.yaml
│ ├── utils
│ │ └── locate-reuse-libs.js
│ ├── webapp
│ │ ├── Component.js
│ │ ├── controller
│ │ │ ├── App.controller.js
│ │ │ ├── BaseController.js
│ │ │ ├── Detail.controller.js
│ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ ├── DetailObjectNotFound.js
│ │ │ ├── ErrorHandler.js
│ │ │ ├── ListSelector.js
│ │ │ ├── Master.controller.js
│ │ │ └── NotFound.controller.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── images
│ │ │ └── logo_ui5.png
│ │ ├── index.html
│ │ ├── localService
│ │ │ ├── metadata.xml
│ │ │ └── mockserver.js
│ │ ├── manifest.json
│ │ ├── model
│ │ │ ├── formatter.js
│ │ │ └── models.js
│ │ ├── test
│ │ │ └── flpSandbox.html
│ │ ├── utils
│ │ │ └── locate-reuse-libs.js
│ │ └── view
│ │ │ ├── App.view.xml
│ │ │ ├── Detail.view.xml
│ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ ├── Master.view.xml
│ │ │ ├── NotFound.view.xml
│ │ │ └── ViewSettingsDialog.fragment.xml
│ └── xs-app.json
├── app2
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── ui5-deploy.yaml
│ ├── ui5-local.yaml
│ ├── ui5.yaml
│ ├── webapp
│ │ ├── Component.js
│ │ ├── controller
│ │ │ ├── App.controller.js
│ │ │ ├── BaseController.js
│ │ │ ├── Detail.controller.js
│ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ ├── DetailObjectNotFound.js
│ │ │ ├── ErrorHandler.js
│ │ │ ├── ListSelector.js
│ │ │ ├── Master.controller.js
│ │ │ └── NotFound.controller.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── images
│ │ │ └── logo_ui5.png
│ │ ├── index.html
│ │ ├── localService
│ │ │ ├── metadata.xml
│ │ │ └── mockserver.js
│ │ ├── manifest.json
│ │ ├── model
│ │ │ ├── formatter.js
│ │ │ └── models.js
│ │ ├── test
│ │ │ └── flpSandbox.html
│ │ ├── utils
│ │ │ └── locate-reuse-libs.js
│ │ └── view
│ │ │ ├── App.view.xml
│ │ │ ├── Detail.view.xml
│ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ ├── Master.view.xml
│ │ │ ├── NotFound.view.xml
│ │ │ └── ViewSettingsDialog.fragment.xml
│ └── xs-app.json
├── lib
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── .library
│ │ ├── comp
│ │ │ └── reuse
│ │ │ │ ├── Component.js
│ │ │ │ ├── controller
│ │ │ │ └── Main.controller.js
│ │ │ │ ├── manifest.json
│ │ │ │ └── view
│ │ │ │ └── Main.view.xml
│ │ ├── controls
│ │ │ ├── Reuse.js
│ │ │ └── ReuseRenderer.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── library.js
│ │ └── manifest.json
│ ├── ui5-deploy.yaml
│ └── xs-app.json
├── mta.yaml
├── package-lock.json
├── package.json
├── workzone
│ └── cdm.json
└── xs-security.json
├── btp-samples-cdm-simple-app
├── LICENSE
├── README.md
├── mta.yaml
├── package-lock.json
├── package.json
├── simple.app
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── ui5-deploy.yaml
│ ├── ui5-local.yaml
│ ├── ui5.yaml
│ ├── webapp
│ │ ├── Component.js
│ │ ├── controller
│ │ │ ├── App.controller.js
│ │ │ ├── BaseController.js
│ │ │ ├── Detail.controller.js
│ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ ├── DetailObjectNotFound.js
│ │ │ ├── ErrorHandler.js
│ │ │ ├── ListSelector.js
│ │ │ ├── Master.controller.js
│ │ │ └── NotFound.controller.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── images
│ │ │ └── logo_ui5.png
│ │ ├── index.html
│ │ ├── localService
│ │ │ ├── metadata.xml
│ │ │ └── mockserver.js
│ │ ├── logout-page.html
│ │ ├── manifest.json
│ │ ├── model
│ │ │ ├── formatter.js
│ │ │ └── models.js
│ │ ├── test
│ │ │ └── flpSandbox.html
│ │ ├── utils
│ │ │ └── locate-reuse-libs.js
│ │ └── view
│ │ │ ├── App.view.xml
│ │ │ ├── Detail.view.xml
│ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ ├── Master.view.xml
│ │ │ ├── NotFound.view.xml
│ │ │ └── ViewSettingsDialog.fragment.xml
│ └── xs-app.json
├── workzone
│ └── cdm.json
└── xs-security.json
├── btp-samples-cdm-split-mta
├── mta-app1
│ ├── app1
│ │ ├── .gitignore
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── ui5-deploy.yaml
│ │ ├── ui5-local.yaml
│ │ ├── ui5.yaml
│ │ ├── webapp
│ │ │ ├── Component.js
│ │ │ ├── controller
│ │ │ │ ├── App.controller.js
│ │ │ │ ├── BaseController.js
│ │ │ │ ├── Detail.controller.js
│ │ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ │ ├── DetailObjectNotFound.js
│ │ │ │ ├── ErrorHandler.js
│ │ │ │ ├── ListSelector.js
│ │ │ │ ├── Master.controller.js
│ │ │ │ └── NotFound.controller.js
│ │ │ ├── i18n
│ │ │ │ └── i18n.properties
│ │ │ ├── images
│ │ │ │ └── logo_ui5.png
│ │ │ ├── index.html
│ │ │ ├── localService
│ │ │ │ ├── metadata.xml
│ │ │ │ └── mockserver.js
│ │ │ ├── manifest.json
│ │ │ ├── model
│ │ │ │ ├── formatter.js
│ │ │ │ └── models.js
│ │ │ └── view
│ │ │ │ ├── App.view.xml
│ │ │ │ ├── Detail.view.xml
│ │ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ │ ├── Master.view.xml
│ │ │ │ ├── NotFound.view.xml
│ │ │ │ └── ViewSettingsDialog.fragment.xml
│ │ └── xs-app.json
│ ├── mta.yaml
│ ├── package-lock.json
│ ├── package.json
│ └── workzone
│ │ └── cdm.json
├── mta-app2
│ ├── app2
│ │ ├── .gitignore
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── ui5-deploy.yaml
│ │ ├── ui5-local.yaml
│ │ ├── ui5.yaml
│ │ ├── webapp
│ │ │ ├── Component.js
│ │ │ ├── controller
│ │ │ │ ├── App.controller.js
│ │ │ │ ├── BaseController.js
│ │ │ │ ├── Detail.controller.js
│ │ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ │ ├── DetailObjectNotFound.js
│ │ │ │ ├── ErrorHandler.js
│ │ │ │ ├── ListSelector.js
│ │ │ │ ├── Master.controller.js
│ │ │ │ └── NotFound.controller.js
│ │ │ ├── i18n
│ │ │ │ └── i18n.properties
│ │ │ ├── images
│ │ │ │ └── logo_ui5.png
│ │ │ ├── index.html
│ │ │ ├── localService
│ │ │ │ ├── metadata.xml
│ │ │ │ └── mockserver.js
│ │ │ ├── manifest.json
│ │ │ ├── model
│ │ │ │ ├── formatter.js
│ │ │ │ └── models.js
│ │ │ └── view
│ │ │ │ ├── App.view.xml
│ │ │ │ ├── Detail.view.xml
│ │ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ │ ├── Master.view.xml
│ │ │ │ ├── NotFound.view.xml
│ │ │ │ └── ViewSettingsDialog.fragment.xml
│ │ └── xs-app.json
│ ├── mta.yaml
│ ├── package-lock.json
│ ├── package.json
│ └── workzone
│ │ └── cdm.json
└── mta-shared
│ ├── README.md
│ ├── lib
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── .library
│ │ ├── comp
│ │ │ └── reuse
│ │ │ │ ├── Component.js
│ │ │ │ ├── controller
│ │ │ │ └── Main.controller.js
│ │ │ │ ├── manifest.json
│ │ │ │ └── view
│ │ │ │ └── Main.view.xml
│ │ ├── controls
│ │ │ ├── Reuse.js
│ │ │ └── ReuseRenderer.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── library.js
│ │ └── manifest.json
│ ├── ui5-deploy.yaml
│ └── xs-app.json
│ ├── mta.yaml
│ ├── package-lock.json
│ ├── package.json
│ ├── workzone
│ └── cdm.json
│ └── xs-security.json
├── btp-samples-consumed-service
├── .gitignore
├── broker
│ ├── catalog.json
│ ├── package-lock.json
│ └── package.json
├── mta.yaml
├── package-lock.json
├── package.json
└── service
│ ├── index.js
│ ├── package-lock.json
│ └── package.json
├── btp-samples-multiple-apps
├── README.md
├── app1
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── ui5-deploy.yaml
│ ├── ui5-local.yaml
│ ├── ui5.yaml
│ ├── utils
│ │ └── locate-reuse-libs.js
│ ├── webapp
│ │ ├── Component.js
│ │ ├── controller
│ │ │ ├── App.controller.js
│ │ │ ├── BaseController.js
│ │ │ ├── Detail.controller.js
│ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ ├── DetailObjectNotFound.js
│ │ │ ├── ErrorHandler.js
│ │ │ ├── ListSelector.js
│ │ │ ├── Master.controller.js
│ │ │ └── NotFound.controller.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── images
│ │ │ └── logo_ui5.png
│ │ ├── index.html
│ │ ├── localService
│ │ │ ├── metadata.xml
│ │ │ └── mockserver.js
│ │ ├── manifest.json
│ │ ├── model
│ │ │ ├── formatter.js
│ │ │ └── models.js
│ │ ├── test
│ │ │ └── flpSandbox.html
│ │ ├── utils
│ │ │ └── locate-reuse-libs.js
│ │ └── view
│ │ │ ├── App.view.xml
│ │ │ ├── Detail.view.xml
│ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ ├── Master.view.xml
│ │ │ ├── NotFound.view.xml
│ │ │ └── ViewSettingsDialog.fragment.xml
│ └── xs-app.json
├── app2
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── ui5-deploy.yaml
│ ├── ui5-local.yaml
│ ├── ui5.yaml
│ ├── webapp
│ │ ├── Component.js
│ │ ├── controller
│ │ │ ├── App.controller.js
│ │ │ ├── BaseController.js
│ │ │ ├── Detail.controller.js
│ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ ├── DetailObjectNotFound.js
│ │ │ ├── ErrorHandler.js
│ │ │ ├── ListSelector.js
│ │ │ ├── Master.controller.js
│ │ │ └── NotFound.controller.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── images
│ │ │ └── logo_ui5.png
│ │ ├── index.html
│ │ ├── localService
│ │ │ ├── metadata.xml
│ │ │ └── mockserver.js
│ │ ├── manifest.json
│ │ ├── model
│ │ │ ├── formatter.js
│ │ │ └── models.js
│ │ ├── test
│ │ │ └── flpSandbox.html
│ │ ├── utils
│ │ │ └── locate-reuse-libs.js
│ │ └── view
│ │ │ ├── App.view.xml
│ │ │ ├── Detail.view.xml
│ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ ├── Master.view.xml
│ │ │ ├── NotFound.view.xml
│ │ │ └── ViewSettingsDialog.fragment.xml
│ └── xs-app.json
├── lib
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── .library
│ │ ├── comp
│ │ │ └── reuse
│ │ │ │ ├── Component.js
│ │ │ │ ├── controller
│ │ │ │ └── Main.controller.js
│ │ │ │ ├── manifest.json
│ │ │ │ └── view
│ │ │ │ └── Main.view.xml
│ │ ├── controls
│ │ │ ├── Reuse.js
│ │ │ └── ReuseRenderer.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── library.js
│ │ └── manifest.json
│ ├── ui5-deploy.yaml
│ └── xs-app.json
├── mta.yaml
├── package-lock.json
├── package.json
└── xs-security.json
├── btp-samples-simple-app
├── LICENSE
├── README.md
├── mta.yaml
├── package-lock.json
├── package.json
├── simple.app
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── ui5-deploy.yaml
│ ├── ui5-local.yaml
│ ├── ui5.yaml
│ ├── webapp
│ │ ├── Component.js
│ │ ├── controller
│ │ │ ├── App.controller.js
│ │ │ ├── BaseController.js
│ │ │ ├── Detail.controller.js
│ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ ├── DetailObjectNotFound.js
│ │ │ ├── ErrorHandler.js
│ │ │ ├── ListSelector.js
│ │ │ ├── Master.controller.js
│ │ │ └── NotFound.controller.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── images
│ │ │ └── logo_ui5.png
│ │ ├── index.html
│ │ ├── localService
│ │ │ ├── metadata.xml
│ │ │ └── mockserver.js
│ │ ├── logout-page.html
│ │ ├── manifest.json
│ │ ├── model
│ │ │ ├── formatter.js
│ │ │ └── models.js
│ │ ├── test
│ │ │ └── flpSandbox.html
│ │ ├── utils
│ │ │ └── locate-reuse-libs.js
│ │ └── view
│ │ │ ├── App.view.xml
│ │ │ ├── Detail.view.xml
│ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ ├── Master.view.xml
│ │ │ ├── NotFound.view.xml
│ │ │ └── ViewSettingsDialog.fragment.xml
│ └── xs-app.json
└── xs-security.json
├── btp-samples-split-destination
├── mta-app1
│ ├── app1
│ │ ├── .gitignore
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── ui5-deploy.yaml
│ │ ├── ui5-local.yaml
│ │ ├── ui5.yaml
│ │ ├── webapp
│ │ │ ├── Component.js
│ │ │ ├── controller
│ │ │ │ ├── App.controller.js
│ │ │ │ ├── BaseController.js
│ │ │ │ ├── Detail.controller.js
│ │ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ │ ├── DetailObjectNotFound.js
│ │ │ │ ├── ErrorHandler.js
│ │ │ │ ├── ListSelector.js
│ │ │ │ ├── Master.controller.js
│ │ │ │ └── NotFound.controller.js
│ │ │ ├── i18n
│ │ │ │ └── i18n.properties
│ │ │ ├── images
│ │ │ │ └── logo_ui5.png
│ │ │ ├── index.html
│ │ │ ├── localService
│ │ │ │ ├── metadata.xml
│ │ │ │ └── mockserver.js
│ │ │ ├── manifest.json
│ │ │ ├── model
│ │ │ │ ├── formatter.js
│ │ │ │ └── models.js
│ │ │ └── view
│ │ │ │ ├── App.view.xml
│ │ │ │ ├── Detail.view.xml
│ │ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ │ ├── Master.view.xml
│ │ │ │ ├── NotFound.view.xml
│ │ │ │ └── ViewSettingsDialog.fragment.xml
│ │ └── xs-app.json
│ ├── mta.yaml
│ ├── package-lock.json
│ ├── package.json
│ └── xs-security.json
├── mta-app2
│ ├── app2
│ │ ├── .gitignore
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── ui5-deploy.yaml
│ │ ├── ui5-local.yaml
│ │ ├── ui5.yaml
│ │ ├── webapp
│ │ │ ├── Component.js
│ │ │ ├── controller
│ │ │ │ ├── App.controller.js
│ │ │ │ ├── BaseController.js
│ │ │ │ ├── Detail.controller.js
│ │ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ │ ├── DetailObjectNotFound.js
│ │ │ │ ├── ErrorHandler.js
│ │ │ │ ├── ListSelector.js
│ │ │ │ ├── Master.controller.js
│ │ │ │ └── NotFound.controller.js
│ │ │ ├── i18n
│ │ │ │ └── i18n.properties
│ │ │ ├── images
│ │ │ │ └── logo_ui5.png
│ │ │ ├── index.html
│ │ │ ├── localService
│ │ │ │ ├── metadata.xml
│ │ │ │ └── mockserver.js
│ │ │ ├── manifest.json
│ │ │ ├── model
│ │ │ │ ├── formatter.js
│ │ │ │ └── models.js
│ │ │ └── view
│ │ │ │ ├── App.view.xml
│ │ │ │ ├── Detail.view.xml
│ │ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ │ ├── Master.view.xml
│ │ │ │ ├── NotFound.view.xml
│ │ │ │ └── ViewSettingsDialog.fragment.xml
│ │ └── xs-app.json
│ ├── mta.yaml
│ ├── package-lock.json
│ ├── package.json
│ └── xs-security.json
└── mta-shared
│ ├── README.md
│ ├── lib
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── .library
│ │ ├── comp
│ │ │ └── reuse
│ │ │ │ ├── Component.js
│ │ │ │ ├── controller
│ │ │ │ └── Main.controller.js
│ │ │ │ ├── manifest.json
│ │ │ │ └── view
│ │ │ │ └── Main.view.xml
│ │ ├── controls
│ │ │ ├── Reuse.js
│ │ │ └── ReuseRenderer.js
│ │ ├── library.js
│ │ ├── manifest.json
│ │ └── messagebundle.properties
│ ├── ui5-deploy.yaml
│ └── xs-app.json
│ ├── mta.yaml
│ ├── package-lock.json
│ ├── package.json
│ └── xs-security.json
├── btp-samples-split-mta
├── mta-app1
│ ├── app1
│ │ ├── .gitignore
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── ui5-deploy.yaml
│ │ ├── ui5-local.yaml
│ │ ├── ui5.yaml
│ │ ├── webapp
│ │ │ ├── Component.js
│ │ │ ├── controller
│ │ │ │ ├── App.controller.js
│ │ │ │ ├── BaseController.js
│ │ │ │ ├── Detail.controller.js
│ │ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ │ ├── DetailObjectNotFound.js
│ │ │ │ ├── ErrorHandler.js
│ │ │ │ ├── ListSelector.js
│ │ │ │ ├── Master.controller.js
│ │ │ │ └── NotFound.controller.js
│ │ │ ├── i18n
│ │ │ │ └── i18n.properties
│ │ │ ├── images
│ │ │ │ └── logo_ui5.png
│ │ │ ├── index.html
│ │ │ ├── localService
│ │ │ │ ├── metadata.xml
│ │ │ │ └── mockserver.js
│ │ │ ├── manifest.json
│ │ │ ├── model
│ │ │ │ ├── formatter.js
│ │ │ │ └── models.js
│ │ │ └── view
│ │ │ │ ├── App.view.xml
│ │ │ │ ├── Detail.view.xml
│ │ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ │ ├── Master.view.xml
│ │ │ │ ├── NotFound.view.xml
│ │ │ │ └── ViewSettingsDialog.fragment.xml
│ │ └── xs-app.json
│ ├── mta.yaml
│ ├── package-lock.json
│ └── package.json
├── mta-app2
│ ├── app2
│ │ ├── .gitignore
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── ui5-deploy.yaml
│ │ ├── ui5-local.yaml
│ │ ├── ui5.yaml
│ │ ├── webapp
│ │ │ ├── Component.js
│ │ │ ├── controller
│ │ │ │ ├── App.controller.js
│ │ │ │ ├── BaseController.js
│ │ │ │ ├── Detail.controller.js
│ │ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ │ ├── DetailObjectNotFound.js
│ │ │ │ ├── ErrorHandler.js
│ │ │ │ ├── ListSelector.js
│ │ │ │ ├── Master.controller.js
│ │ │ │ └── NotFound.controller.js
│ │ │ ├── i18n
│ │ │ │ └── i18n.properties
│ │ │ ├── images
│ │ │ │ └── logo_ui5.png
│ │ │ ├── index.html
│ │ │ ├── localService
│ │ │ │ ├── metadata.xml
│ │ │ │ └── mockserver.js
│ │ │ ├── manifest.json
│ │ │ ├── model
│ │ │ │ ├── formatter.js
│ │ │ │ └── models.js
│ │ │ └── view
│ │ │ │ ├── App.view.xml
│ │ │ │ ├── Detail.view.xml
│ │ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ │ ├── Master.view.xml
│ │ │ │ ├── NotFound.view.xml
│ │ │ │ └── ViewSettingsDialog.fragment.xml
│ │ └── xs-app.json
│ ├── mta.yaml
│ ├── package-lock.json
│ └── package.json
└── mta-shared
│ ├── README.md
│ ├── lib
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── .library
│ │ ├── comp
│ │ │ └── reuse
│ │ │ │ ├── Component.js
│ │ │ │ ├── controller
│ │ │ │ └── Main.controller.js
│ │ │ │ ├── manifest.json
│ │ │ │ └── view
│ │ │ │ └── Main.view.xml
│ │ ├── controls
│ │ │ ├── Reuse.js
│ │ │ └── ReuseRenderer.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── library.js
│ │ └── manifest.json
│ ├── ui5-deploy.yaml
│ └── xs-app.json
│ ├── mta.yaml
│ ├── package-lock.json
│ ├── package.json
│ └── xs-security.json
└── btp-samples-split-xsuaa
├── mta-app1
├── app1
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── ui5-deploy.yaml
│ ├── ui5-local.yaml
│ ├── ui5.yaml
│ ├── webapp
│ │ ├── Component.js
│ │ ├── controller
│ │ │ ├── App.controller.js
│ │ │ ├── BaseController.js
│ │ │ ├── Detail.controller.js
│ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ ├── DetailObjectNotFound.js
│ │ │ ├── ErrorHandler.js
│ │ │ ├── ListSelector.js
│ │ │ ├── Master.controller.js
│ │ │ └── NotFound.controller.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── images
│ │ │ └── logo_ui5.png
│ │ ├── index.html
│ │ ├── localService
│ │ │ ├── metadata.xml
│ │ │ └── mockserver.js
│ │ ├── manifest.json
│ │ ├── model
│ │ │ ├── formatter.js
│ │ │ └── models.js
│ │ └── view
│ │ │ ├── App.view.xml
│ │ │ ├── Detail.view.xml
│ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ ├── Master.view.xml
│ │ │ ├── NotFound.view.xml
│ │ │ └── ViewSettingsDialog.fragment.xml
│ └── xs-app.json
├── mta.yaml
├── package-lock.json
├── package.json
└── xs-security.json
├── mta-app2
├── app2
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── ui5-deploy.yaml
│ ├── ui5-local.yaml
│ ├── ui5.yaml
│ ├── webapp
│ │ ├── Component.js
│ │ ├── controller
│ │ │ ├── App.controller.js
│ │ │ ├── BaseController.js
│ │ │ ├── Detail.controller.js
│ │ │ ├── DetailObjectNotFound.controller.js
│ │ │ ├── DetailObjectNotFound.js
│ │ │ ├── ErrorHandler.js
│ │ │ ├── ListSelector.js
│ │ │ ├── Master.controller.js
│ │ │ └── NotFound.controller.js
│ │ ├── i18n
│ │ │ └── i18n.properties
│ │ ├── images
│ │ │ └── logo_ui5.png
│ │ ├── index.html
│ │ ├── localService
│ │ │ ├── metadata.xml
│ │ │ └── mockserver.js
│ │ ├── manifest.json
│ │ ├── model
│ │ │ ├── formatter.js
│ │ │ └── models.js
│ │ └── view
│ │ │ ├── App.view.xml
│ │ │ ├── Detail.view.xml
│ │ │ ├── DetailObjectNotFound.view.xml
│ │ │ ├── Master.view.xml
│ │ │ ├── NotFound.view.xml
│ │ │ └── ViewSettingsDialog.fragment.xml
│ └── xs-app.json
├── mta.yaml
├── package-lock.json
├── package.json
└── xs-security.json
└── mta-shared
├── README.md
├── lib
├── .gitignore
├── package-lock.json
├── package.json
├── src
│ ├── .library
│ ├── comp
│ │ └── reuse
│ │ │ ├── Component.js
│ │ │ ├── controller
│ │ │ └── Main.controller.js
│ │ │ ├── manifest.json
│ │ │ └── view
│ │ │ └── Main.view.xml
│ ├── controls
│ │ ├── Reuse.js
│ │ └── ReuseRenderer.js
│ ├── i18n
│ │ └── i18n.properties
│ ├── library.js
│ └── manifest.json
├── ui5-deploy.yaml
└── xs-app.json
├── mta.yaml
├── package-lock.json
├── package.json
└── xs-security.json
/.gitignore:
--------------------------------------------------------------------------------
1 | **/mta_archives/
2 | **/node_modules/
3 | **/resources/
4 | .vscode
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/README.md:
--------------------------------------------------------------------------------
1 | # BTPSamples for business solution in SAP Build Work Zone - Multiple Apps
2 | This repository contains the 2nd sample project which is discussed in my blog [Designing UI5 Apps as Business Solution for SAP Build Work Zone - Part 2](https://community.sap.com/t5/technology-blogs-by-sap/designing-ui5-apps-as-business-solution-for-sap-build-work-zone-part-2/ba-p/13929148)
3 |
4 | To deploy this sample to your space
5 | - In the mta.yaml file replace the placeholder {YOURDOMAIN} with the subdomain of the target subaccount
6 | - Login to cf cli
7 | - npm install
8 | - npm run build:mta
9 | - npm run deploy
10 | - Subscribe the Launchpad service to your sub account
11 | - Go to Launchpad Site Manager -> Channel Manager create a new content provider
12 | - Provide the Design-Time and Runtime destinations that have been created during deployment
13 | - The CDM content should now appear in Content Manager
14 | - Go to the Site Settings of your Site and add the role to the site
15 | - In the sub account trust configuration add the corresponding role collection to your user
16 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.cdm.multiple.apps.app1
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplescdmmultipleappsapp1
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'btp.samples.cdm.multiple.apps.app1'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplescdmmultipleapps.btpsamplescdmmultipleappslib
12 | src: "../lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.multiple.apps.app1.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.multiple.apps.app1.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.multiple.apps.app1.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-cdm-multiple-apps/app1/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Multiple Apps - App 1
7 |
8 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app1/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.cdm.multiple.apps.app2
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplescdmmultipleappsapp2
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'btp.samples.cdm.multiple.apps.app2'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'btp.samples.cdm.multiple.apps.app2'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplescdmmultipleapps.btpsamplescdmmultipleappslib
12 | src: "../lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.multiple.apps.app2.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.multiple.apps.app2.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.multiple.apps.app2.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-cdm-multiple-apps/app2/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Multiple Apps - App 2
7 |
8 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/app2/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "btp.samples.cdm.multiple.apps.lib",
3 | "version": "0.0.1",
4 | "private": true,
5 | "sapuxLayer": "VENDOR",
6 | "description": "A shared library",
7 | "keywords": [
8 | "ui5",
9 | "openui5",
10 | "sapui5"
11 | ],
12 | "main": "webapp/index.html",
13 | "scripts": {
14 | "build": "ui5 build -a --clean-dest",
15 | "build:cf": "ui5 build preload --clean-dest --config ui5-deploy.yaml"
16 | },
17 | "devDependencies": {
18 | "@ui5/cli": "^4.0.9",
19 | "@ui5/fs": "^4.0.1",
20 | "@ui5/logger": "^4.0.1",
21 | "rimraf": "5.0.5",
22 | "ui5-task-zipper": "^3.3.1"
23 | },
24 | "ui5": {
25 | "dependencies": [
26 | "ui5-task-zipper"
27 | ]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/src/.library:
--------------------------------------------------------------------------------
1 |
2 |
3 | btp.samples.cdm.multiple.apps.lib
4 | SAP SE
5 | 1.0.0
6 | ${copyright}
7 | >title
8 |
9 |
10 |
11 | sap.ui.core
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/src/comp/reuse/Component.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/UIComponent",
3 | ], function (UIComponent) {
4 | "use strict";
5 |
6 | return UIComponent.extend("btp.samples.cdm.multiple.apps.lib.comp.reuse.Component", {
7 |
8 | metadata : {
9 | manifest : "json"
10 | },
11 |
12 | /**
13 | * The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
14 | * In this method, the device models are set and the router is initialized.
15 | * @public
16 | * @override
17 | */
18 | init : function () {
19 | // call the base component's init function and create the App view
20 | UIComponent.prototype.init.apply(this, arguments);
21 |
22 | },
23 |
24 | /**
25 | * The component is destroyed by UI5 automatically.
26 | * In this method, the ListSelector and ErrorHandler are destroyed.
27 | * @public
28 | * @override
29 | */
30 | destroy : function () {
31 | // call the base component's destroy function
32 | UIComponent.prototype.destroy.apply(this, arguments);
33 | }
34 | });
35 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/src/comp/reuse/controller/Main.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/mvc/Controller",
3 | "sap/ui/model/json/JSONModel"
4 | ], function (Controller, JSONModel) {
5 | "use strict";
6 |
7 | return Controller.extend("btp.samples.cdm.multiple.apps.lib.reuse.comp.controller.Main", {
8 |
9 |
10 | });
11 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/src/comp/reuse/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.cdm.multiple.apps.lib.comp.reuse",
5 | "type": "component",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{appTitle}}",
8 | "description": "{{appDescription}}",
9 | "applicationVersion": {
10 | "version": "1.0.0"
11 | },
12 | "embeddedBy": "../../"
13 | },
14 |
15 | "sap.ui5": {
16 | "rootView": {
17 | "viewName": "btp.samples.cdm.multiple.apps.lib.comp.reuse.view.Main",
18 | "type": "XML",
19 | "async": true,
20 | "id": "main"
21 | },
22 | "dependencies": {
23 | "minUI5Version": "1.95.0",
24 | "libs": {
25 | "sap.ui.core": {},
26 | "sap.m": {},
27 | "btp.samples.cdm.multiple.apps.lib": {}
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/src/comp/reuse/view/Main.view.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/src/controls/ReuseRenderer.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ${copyright}
3 | */
4 |
5 | sap.ui.define([],
6 |
7 | function () {
8 | "use strict";
9 |
10 | /**
11 | * Reuse renderer.
12 | * @namespace
13 | */
14 | var ReuseRenderer = {};
15 |
16 | /**
17 | * Renders the HTML for the given control, using the provided
18 | * {@link sap.ui.core.RenderManager}.
19 | *
20 | * @param {sap.ui.core.RenderManager} oRm
21 | * the RenderManager that can be used for writing to
22 | * the Render-Output-Buffer
23 | * @param {sap.ui.core.Control} oControl
24 | * the control to be rendered
25 | */
26 | ReuseRenderer.render = function (oRm, oControl) {
27 |
28 | oRm.write("");
33 | oRm.write(sap.ui.getCore().getLibraryResourceBundle("btp.samples.cdm.multiple.apps.lib").getText("ANY_TEXT"));
34 |
35 | oRm.writeEscaped(oControl.getText());
36 | oRm.write("
");
37 |
38 | };
39 |
40 | return ReuseRenderer;
41 |
42 | }, /* bExport= */ true);
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/src/i18n/i18n.properties:
--------------------------------------------------------------------------------
1 | title=Shared library with reusable code
2 | ANY_TEXT=Reusable control from lib
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/src/library.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ${copyright}
3 | */
4 |
5 | /**
6 | * Initialization Code and shared classes of library btp.samples.cdm.multiple.apps.lib.
7 | */
8 | sap.ui.define(["sap/ui/core/library"], // library dependency
9 | function () {
10 |
11 | "use strict";
12 |
13 | /**
14 | *
15 | *
16 | * @namespace
17 | * @name btp.samples.cdm.multiple.apps.lib
18 | * @author SAP SE
19 | * @version 1.0.0
20 | * @public
21 | */
22 |
23 | // delegate further initialization of this library to the Core
24 | sap.ui.getCore().initLibrary({
25 | name: "btp.samples.cdm.multiple.apps.lib",
26 | version: "1.0.0",
27 | dependencies: ["sap.ui.core"],
28 | noLibraryCSS: true,
29 | types: [],
30 | interfaces: [],
31 | controls: [
32 | "btp.samples.cdm.multiple.apps.lib.controls.Reuse"
33 | ],
34 | elements: []
35 | });
36 |
37 | /* eslint-disable */
38 | return btp.samples.cdm.multiple.apps.lib;
39 | /* eslint-enable */
40 |
41 | }, /* bExport= */ false);
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.cdm.multiple.apps.lib",
5 | "type": "library",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{title}}",
8 | "applicationVersion": {
9 | "version": "1.0.0"
10 | },
11 | "embeds":["comp/reuse"]
12 | },
13 |
14 | "sap.ui5": {
15 | "dependencies": {
16 | "minUI5Version": "1.95.0",
17 | "libs": {
18 | "sap.ui.core": {},
19 | "sap.m": {},
20 | "sap.f": {}
21 | }
22 | }
23 | },
24 | "sap.cloud": {
25 | "public": true,
26 | "service": "btp.samples.cdm.multiple.apps"
27 | }
28 | }
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.cdm.multiple.apps.lib
5 | type: library
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: buildThemes
17 | configuration:
18 | archiveName: btpsamplescdmmultipleappslib
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/lib/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "authenticationMethod": "route",
3 | "routes": [
4 | {
5 | "source": "^(.*)$",
6 | "target": "$1",
7 | "service": "html5-apps-repo-rt",
8 | "authenticationType": "xsuaa"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "multiple.apps.mta",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-cdm-multiple-apps --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27",
18 | "@sap/ux-ui5-tooling": "1.17.5"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-multiple-apps/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplescdmmultipleapps",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/README.md:
--------------------------------------------------------------------------------
1 | # BTPSamples for business solution in SAP Build Work Zone - Simple App
2 | This repository contains the first sample project which is discussed in my blog [Designing UI5 Apps as Business Solution for SAP Build Work Zone - Part 1](https://community.sap.com/t5/technology-blogs-by-sap/designing-ui5-apps-as-business-solution-for-sap-build-work-zone-part-1/ba-p/13923459)
3 |
4 | To deploy this sample to your space
5 | - In the mta.yaml file replace the placeholder {YOURDOMAIN} with the subdomain of the target subaccount
6 | - Login to cf cli
7 | - npm install
8 | - npm run build:mta
9 | - npm run deploy
10 | - Subscribe the Launchpad service to your sub account
11 | - Go to Launchpad Site Manager -> Channel Manager create a new content provider
12 | - Provide the Design-Time and Runtime destinations that have been created during deployment
13 | - The CDM content should now appear in Content Manager
14 | - Go to the Site Settings of your Site and add the role to the site
15 | - In the sub account trust configuration add the corresponding role collection to your user
16 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cdm.simple.app.mta",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "deploy": "fiori cfDeploy",
7 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
8 | "undeploy": "cf undeploy btp-samples-cdm-simple-app --delete-services --delete-service-keys"
9 | },
10 | "devDependencies": {
11 | "rimraf": "5.0.5",
12 | "mbt": "^1.2.33",
13 | "@sap/ux-ui5-tooling": "1.17.5"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.cdm.simple.app
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplescdmsimpleapp
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'btp.samples.cdm.simple.app'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'btp.samples.cdm.simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-proxy
8 | afterMiddleware: compression
9 | configuration:
10 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
11 | backend:
12 | - path: /northwind
13 | pathPrefix: /
14 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
15 | ui5:
16 | path:
17 | - /resources
18 | - /test-resources
19 | url: https://ui5.sap.com
20 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
21 | - name: fiori-tools-appreload
22 | afterMiddleware: compression
23 | configuration:
24 | port: 35729
25 | path: webapp
26 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.simple.app.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.simple.app.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.simple.app.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-cdm-simple-app/simple.app/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Simple App
7 |
8 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/logout-page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Simple App - Logged off
7 |
8 |
9 | You have been logged off
10 |
11 |
12 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/simple.app/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "logout": {
5 | "logoutEndpoint": "/logout",
6 | "logoutPage": "/logout-page.html"
7 | },
8 | "routes": [
9 | {
10 | "source": "^/northwind/(.*)$",
11 | "target": "/$1",
12 | "authenticationType": "none",
13 | "destination": "northwind"
14 | },
15 | {
16 | "source": "^/index.html",
17 | "service": "html5-apps-repo-rt",
18 | "cacheControl": "no-cache, no-store, must-revalidate"
19 | },
20 | {
21 | "source": "^/logout-page.html$",
22 | "service": "html5-apps-repo-rt",
23 | "authenticationType": "none"
24 | },
25 | {
26 | "source": "^(.*)$",
27 | "target": "$1",
28 | "service": "html5-apps-repo-rt",
29 | "authenticationType": "xsuaa"
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/btp-samples-cdm-simple-app/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplescdmsimpleapp",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: 'btp.samples.cdm.split.mta.app1'
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplescdmsplitmtaapp1
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'btp.samples.cdm.split.mta.app1'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'btp.samples.cdm.split.mta.app1'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplescdmsplitmta.btpsamplescdmsplitmtalib
12 | src: "../../mta-shared/lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.split.mta.app1.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.split.mta.app1.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.split.mta.app1.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-cdm-split-mta/mta-app1/app1/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/app1/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.mta.app1",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-cdm-split-mta-app1 --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27",
18 | "@sap/ux-ui5-tooling": "1.17.5"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.cdm.split.mta.app2
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplescdmsplitmtaapp2
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'btp.samples.cdm.split.mta.app2'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'btp.samples.cdm.split.mta.app2'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplescdmsplitmta.btpsamplescdmsplitmtalib
12 | src: "../../mta-shared/lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.split.mta.app2.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.split.mta.app2.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.cdm.split.mta.app2.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-cdm-split-mta/mta-app2/app2/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/app2/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-app2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.mta.app2",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-cdm-split-mta-app2 --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27",
18 | "@sap/ux-ui5-tooling": "1.17.5"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/README.md:
--------------------------------------------------------------------------------
1 | # BTPSamples
2 | This repository contains the 2nd sample project which is discussed in my blog https://blogs.sap.com/2022/02/08/designing-ui5-apps-for-sap-launchpad-service-part-2/
3 |
4 | To deploy this sample to your space
5 | - Login to cf cli
6 | - npm install
7 | - npm run build:mta
8 | - npm run deploy
9 | - Subscribe the Launchpad service to your sub account
10 | - Go to Launchpad configuration -> Content Providers and sync the HTML5 Apps provider
11 | - Configure the app for your site
12 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "btp.samples.cdm.split.mta.lib",
3 | "version": "0.0.1",
4 | "private": true,
5 | "sapuxLayer": "VENDOR",
6 | "description": "A shared library",
7 | "keywords": [
8 | "ui5",
9 | "openui5",
10 | "sapui5"
11 | ],
12 | "main": "webapp/index.html",
13 | "scripts": {
14 | "build": "ui5 build -a --clean-dest",
15 | "build:cf": "ui5 build preload --clean-dest --config ui5-deploy.yaml"
16 | },
17 | "devDependencies": {
18 | "@ui5/cli": "^4.0.9",
19 | "@ui5/fs": "^4.0.1",
20 | "@ui5/logger": "^4.0.1",
21 | "rimraf": "5.0.5",
22 | "ui5-task-zipper": "^3.1.1"
23 | },
24 | "ui5": {
25 | "dependencies": [
26 | "ui5-task-zipper"
27 | ]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/src/.library:
--------------------------------------------------------------------------------
1 |
2 |
3 | btp.samples.cdm.split.mta.lib
4 | SAP SE
5 | 1.0.0
6 | ${copyright}
7 | >title
8 |
9 |
10 |
11 | sap.ui.core
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/src/comp/reuse/Component.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/UIComponent",
3 | ], function (UIComponent) {
4 | "use strict";
5 |
6 | return UIComponent.extend("btp.samples.cdm.split.mta.lib.comp.reuse.Component", {
7 |
8 | metadata : {
9 | manifest : "json"
10 | },
11 |
12 | /**
13 | * The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
14 | * In this method, the device models are set and the router is initialized.
15 | * @public
16 | * @override
17 | */
18 | init : function () {
19 | // call the base component's init function and create the App view
20 | UIComponent.prototype.init.apply(this, arguments);
21 |
22 | },
23 |
24 | /**
25 | * The component is destroyed by UI5 automatically.
26 | * In this method, the ListSelector and ErrorHandler are destroyed.
27 | * @public
28 | * @override
29 | */
30 | destroy : function () {
31 | // call the base component's destroy function
32 | UIComponent.prototype.destroy.apply(this, arguments);
33 | }
34 | });
35 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/src/comp/reuse/controller/Main.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/mvc/Controller",
3 | "sap/ui/model/json/JSONModel"
4 | ], function (Controller, JSONModel) {
5 | "use strict";
6 |
7 | return Controller.extend("btp.samples.cdm.split.mta.lib.reuse.comp.controller.Main", {
8 |
9 |
10 | });
11 | });
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/src/comp/reuse/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.cdm.split.mta.lib.comp.reuse",
5 | "type": "component",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{appTitle}}",
8 | "description": "{{appDescription}}",
9 | "applicationVersion": {
10 | "version": "1.0.0"
11 | },
12 | "embeddedBy": "../../"
13 | },
14 |
15 | "sap.ui5": {
16 | "rootView": {
17 | "viewName": "btp.samples.cdm.split.mta.lib.comp.reuse.view.Main",
18 | "type": "XML",
19 | "async": true,
20 | "id": "main"
21 | },
22 | "dependencies": {
23 | "minUI5Version": "1.95.0",
24 | "libs": {
25 | "sap.ui.core": {},
26 | "sap.m": {},
27 | "btp.samples.cdm.split.mta.lib": {}
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/src/comp/reuse/view/Main.view.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/src/i18n/i18n.properties:
--------------------------------------------------------------------------------
1 | title=Shared library with reusable code
2 | ANY_TEXT=Reusable control from lib
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/src/library.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ${copyright}
3 | */
4 |
5 | /**
6 | * Initialization Code and shared classes of library btp.samples.cdm.split.mta.lib.
7 | */
8 | sap.ui.define(["sap/ui/core/library"], // library dependency
9 | function () {
10 |
11 | "use strict";
12 |
13 | /**
14 | *
15 | *
16 | * @namespace
17 | * @name btp.samples.cdm.split.mta.lib
18 | * @author SAP SE
19 | * @version 1.0.0
20 | * @public
21 | */
22 |
23 | // delegate further initialization of this library to the Core
24 | sap.ui.getCore().initLibrary({
25 | name: "btp.samples.cdm.split.mta.lib",
26 | version: "1.0.0",
27 | dependencies: ["sap.ui.core"],
28 | noLibraryCSS: true,
29 | types: [],
30 | interfaces: [],
31 | controls: [
32 | "btp.samples.cdm.split.mta.lib.controls.Reuse"
33 | ],
34 | elements: []
35 | });
36 |
37 | /* eslint-disable */
38 | return btp.samples.cdm.split.mta.lib;
39 | /* eslint-enable */
40 |
41 | }, /* bExport= */ false);
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.cdm.split.mta.lib",
5 | "type": "library",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{title}}",
8 | "applicationVersion": {
9 | "version": "1.0.0"
10 | },
11 | "embeds":["comp/reuse"]
12 | },
13 |
14 | "sap.ui5": {
15 | "dependencies": {
16 | "minUI5Version": "1.95.0",
17 | "libs": {
18 | "sap.ui.core": {},
19 | "sap.m": {},
20 | "sap.f": {}
21 | }
22 | }
23 | },
24 | "sap.cloud": {
25 | "public": true,
26 | "service": "btp.samples.cdm.split.mta"
27 | }
28 | }
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.cdm.split.mta.lib
5 | type: library
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: buildThemes
17 | configuration:
18 | archiveName: btpsamplescdmsplitmtalib
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/lib/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "authenticationMethod": "route",
3 | "routes": [
4 | {
5 | "source": "^(.*)$",
6 | "target": "$1",
7 | "service": "html5-apps-repo-rt",
8 | "authenticationType": "xsuaa"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.mta.shared",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-cdm-split-mta-shared --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27",
18 | "@sap/ux-ui5-tooling": "1.17.5"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/btp-samples-cdm-split-mta/mta-shared/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplescdmsplitmta",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-consumed-service/.gitignore:
--------------------------------------------------------------------------------
1 | /mta_archives/
2 | /node_modules/
3 | /resources/
4 |
--------------------------------------------------------------------------------
/btp-samples-consumed-service/broker/catalog.json:
--------------------------------------------------------------------------------
1 | {
2 | "services": [
3 | {
4 | "name": "btp-samples-consumed-service",
5 | "id": "da1de010-8c61-4cf5-9cfb-f0bf5a78542e",
6 | "description": "BTP Samples consumed service",
7 | "bindable": true,
8 | "plans": [
9 | {
10 | "id": "ece8a622-b37e-4866-9295-da92ff2d3947",
11 | "name": "document-service",
12 | "description": "Simple service plan"
13 | }
14 | ]
15 | }
16 | ]
17 | }
--------------------------------------------------------------------------------
/btp-samples-consumed-service/broker/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "btp-samples-consumed-service-broker",
3 | "version": "1.0.0",
4 | "description": "Broker for consumed sample service",
5 | "scripts": {
6 | "start": "start-broker"
7 | },
8 | "dependencies": {
9 | "@sap/sbf": "^6.9.2"
10 | },
11 | "engines": {
12 | "node": "^20"
13 | }
14 | }
--------------------------------------------------------------------------------
/btp-samples-consumed-service/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "btp-samples-consumed-service",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-consumed-service --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27",
18 | "@sap/ux-ui5-tooling": "1.17.5"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/btp-samples-consumed-service/service/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const app = express();
3 | const port = process.env.port || 8080;
4 |
5 | // secure the direct call to the application
6 | const passport = require('passport');
7 | const { JWTStrategy } = require('@sap/xssec');
8 | const xsenv = require('@sap/xsenv');
9 |
10 | // XSUAA Middleware
11 | passport.use(new JWTStrategy(xsenv.getServices({uaa:{tag:'xsuaa'}}).uaa));
12 |
13 | app.use(passport.initialize());
14 | app.use(passport.authenticate('JWT', { session: false }));
15 |
16 | app.get('/api/info', getInfo);
17 |
18 | app.listen(port, () => {
19 | console.log('%s listening at %s', app.name, port);
20 | })
21 |
22 | function getInfo(req, res, next) {
23 |
24 | res.setHeader('Content-Type', 'application/json');
25 | const result = {
26 | user: req.user,
27 | authInfo: req.authInfo,
28 | clientId: req.authInfo.getClientId()
29 | };
30 | res.send(result);
31 | }
--------------------------------------------------------------------------------
/btp-samples-consumed-service/service/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "btp-samples-consumed-service",
3 | "version": "1.0.0",
4 | "description": "Consumed sample service",
5 | "scripts": {
6 | "start": "node index.js"
7 | },
8 | "dependencies": {
9 | "express": "^4.21.2",
10 | "@sap/xsenv": "^3.1.0",
11 | "@sap/xssec": "^3.0.10",
12 | "passport": "^0.6.0"
13 | },
14 | "engines": {
15 | "node": "^20"
16 | }
17 | }
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/README.md:
--------------------------------------------------------------------------------
1 | # BTPSamples
2 | This repository contains the 2nd sample project which is discussed in my blog https://blogs.sap.com/2022/02/08/designing-ui5-apps-for-sap-launchpad-service-part-2/
3 |
4 | To deploy this sample to your space
5 | - Login to cf cli
6 | - npm install
7 | - npm run build:mta
8 | - npm run deploy
9 | - Subscribe the Launchpad service to your sub account
10 | - Go to Launchpad configuration -> Content Providers and sync the HTML5 Apps provider
11 | - Configure the app for your site
12 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.multiple.apps.app1
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplesmultipleappsapp1
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplesmultipleapps.btpsamplesmultipleappslib
12 | src: "../lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.multiple.apps.app1.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.multiple.apps.app1.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.multiple.apps.app1.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-multiple-apps/app1/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app1/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.multiple.apps.app2
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplesmultipleappsapp2
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplesmultipleapps.btpsamplesmultipleappslib
12 | src: "../lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.multiple.apps.app2.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.multiple.apps.app2.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.multiple.apps.app2.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-multiple-apps/app2/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/app2/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "btp.samples.multiple.apps.lib",
3 | "version": "0.0.1",
4 | "private": true,
5 | "sapuxLayer": "VENDOR",
6 | "description": "A shared library",
7 | "keywords": [
8 | "ui5",
9 | "openui5",
10 | "sapui5"
11 | ],
12 | "main": "webapp/index.html",
13 | "scripts": {
14 | "build": "ui5 build -a --clean-dest",
15 | "build:cf": "ui5 build preload --clean-dest --config ui5-deploy.yaml"
16 | },
17 | "devDependencies": {
18 | "@ui5/cli": "^4.0.9",
19 | "@ui5/fs": "^4.0.1",
20 | "@ui5/logger": "^4.0.1",
21 | "rimraf": "5.0.5",
22 | "ui5-task-zipper": "^3.3.1"
23 | },
24 | "ui5": {
25 | "dependencies": [
26 | "ui5-task-zipper"
27 | ]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/src/.library:
--------------------------------------------------------------------------------
1 |
2 |
3 | btp.samples.multiple.apps.lib
4 | SAP SE
5 | 1.0.0
6 | ${copyright}
7 | >title
8 |
9 |
10 |
11 | sap.ui.core
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/src/comp/reuse/Component.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/UIComponent",
3 | ], function (UIComponent) {
4 | "use strict";
5 |
6 | return UIComponent.extend("btp.samples.multiple.apps.lib.comp.reuse.Component", {
7 |
8 | metadata : {
9 | manifest : "json"
10 | },
11 |
12 | /**
13 | * The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
14 | * In this method, the device models are set and the router is initialized.
15 | * @public
16 | * @override
17 | */
18 | init : function () {
19 | // call the base component's init function and create the App view
20 | UIComponent.prototype.init.apply(this, arguments);
21 |
22 | },
23 |
24 | /**
25 | * The component is destroyed by UI5 automatically.
26 | * In this method, the ListSelector and ErrorHandler are destroyed.
27 | * @public
28 | * @override
29 | */
30 | destroy : function () {
31 | // call the base component's destroy function
32 | UIComponent.prototype.destroy.apply(this, arguments);
33 | }
34 | });
35 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/src/comp/reuse/controller/Main.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/mvc/Controller",
3 | "sap/ui/model/json/JSONModel"
4 | ], function (Controller, JSONModel) {
5 | "use strict";
6 |
7 | return Controller.extend("btp.samples.multiple.apps.lib.reuse.comp.controller.Main", {
8 |
9 |
10 | });
11 | });
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/src/comp/reuse/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.multiple.apps.lib.comp.reuse",
5 | "type": "component",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{appTitle}}",
8 | "description": "{{appDescription}}",
9 | "applicationVersion": {
10 | "version": "1.0.0"
11 | },
12 | "embeddedBy": "../../"
13 | },
14 |
15 | "sap.ui5": {
16 | "rootView": {
17 | "viewName": "btp.samples.multiple.apps.lib.comp.reuse.view.Main",
18 | "type": "XML",
19 | "async": true,
20 | "id": "main"
21 | },
22 | "dependencies": {
23 | "minUI5Version": "1.95.0",
24 | "libs": {
25 | "sap.ui.core": {},
26 | "sap.m": {},
27 | "btp.samples.multiple.apps.lib": {}
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/src/comp/reuse/view/Main.view.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/src/controls/ReuseRenderer.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ${copyright}
3 | */
4 |
5 | sap.ui.define([],
6 |
7 | function () {
8 | "use strict";
9 |
10 | /**
11 | * Reuse renderer.
12 | * @namespace
13 | */
14 | var ReuseRenderer = {};
15 |
16 | /**
17 | * Renders the HTML for the given control, using the provided
18 | * {@link sap.ui.core.RenderManager}.
19 | *
20 | * @param {sap.ui.core.RenderManager} oRm
21 | * the RenderManager that can be used for writing to
22 | * the Render-Output-Buffer
23 | * @param {sap.ui.core.Control} oControl
24 | * the control to be rendered
25 | */
26 | ReuseRenderer.render = function (oRm, oControl) {
27 |
28 | oRm.write("");
33 | oRm.write(sap.ui.getCore().getLibraryResourceBundle("btp.samples.multiple.apps.lib").getText("ANY_TEXT"));
34 |
35 | oRm.writeEscaped(oControl.getText());
36 | oRm.write("
");
37 |
38 | };
39 |
40 | return ReuseRenderer;
41 |
42 | }, /* bExport= */ true);
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/src/i18n/i18n.properties:
--------------------------------------------------------------------------------
1 | title=Shared library with reusable code
2 | ANY_TEXT=Reusable control from lib
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/src/library.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ${copyright}
3 | */
4 |
5 | /**
6 | * Initialization Code and shared classes of library btp.samples.multiple.apps.lib.
7 | */
8 | sap.ui.define(["sap/ui/core/library"], // library dependency
9 | function () {
10 |
11 | "use strict";
12 |
13 | /**
14 | *
15 | *
16 | * @namespace
17 | * @name btp.samples.multiple.apps.lib
18 | * @author SAP SE
19 | * @version 1.0.0
20 | * @public
21 | */
22 |
23 | // delegate further initialization of this library to the Core
24 | sap.ui.getCore().initLibrary({
25 | name: "btp.samples.multiple.apps.lib",
26 | version: "1.0.0",
27 | dependencies: ["sap.ui.core"],
28 | noLibraryCSS: true,
29 | types: [],
30 | interfaces: [],
31 | controls: [
32 | "btp.samples.multiple.apps.lib.controls.Reuse"
33 | ],
34 | elements: []
35 | });
36 |
37 | /* eslint-disable */
38 | return btp.samples.multiple.apps.lib;
39 | /* eslint-enable */
40 |
41 | }, /* bExport= */ false);
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.multiple.apps.lib",
5 | "type": "library",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{title}}",
8 | "applicationVersion": {
9 | "version": "1.0.0"
10 | },
11 | "embeds":["comp/reuse"]
12 | },
13 |
14 | "sap.ui5": {
15 | "dependencies": {
16 | "minUI5Version": "1.95.0",
17 | "libs": {
18 | "sap.ui.core": {},
19 | "sap.m": {},
20 | "sap.f": {}
21 | }
22 | }
23 | },
24 | "sap.cloud": {
25 | "public": true,
26 | "service": "btp.samples.multiple.apps"
27 | }
28 | }
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.multiple.apps.lib
5 | type: library
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: buildThemes
17 | configuration:
18 | archiveName: btpsamplesmultipleappslib
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/lib/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "authenticationMethod": "route",
3 | "routes": [
4 | {
5 | "source": "^(.*)$",
6 | "target": "$1",
7 | "service": "html5-apps-repo-rt",
8 | "authenticationType": "xsuaa"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "multiple.apps.mta",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-multiple-apps --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.33",
18 | "@sap/ux-ui5-tooling": "1.17.5"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/btp-samples-multiple-apps/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplesmultipleapps",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/README.md:
--------------------------------------------------------------------------------
1 | # BTPSamples
2 | This repository contains the first sample project which is discussed in my blog https://blogs.sap.com/2022/01/14/designing-ui5-apps-for-sap-launchpad-service-part-1/
3 |
4 | To deploy this sample to your space
5 | - Login to cf cli
6 | - npm install
7 | - npm run build:mta
8 | - npm run deploy
9 | - Subscribe the Launchpad service to your sub account
10 | - Go to Launchpad configuration -> Content Providers and sync the HTML5 Apps provider
11 | - Configure the app for your site
12 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "simple.app.mta",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "deploy": "fiori cfDeploy",
7 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
8 | "undeploy": "cf undeploy btp-samples-simple-app --delete-services --delete-service-keys"
9 | },
10 | "devDependencies": {
11 | "rimraf": "5.0.5",
12 | "mbt": "^1.2.33",
13 | "@sap/ux-ui5-tooling": "1.17.5"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.simple.app
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplessimpleapp
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-proxy
8 | afterMiddleware: compression
9 | configuration:
10 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
11 | backend:
12 | - path: /northwind
13 | pathPrefix: /
14 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
15 | ui5:
16 | path:
17 | - /resources
18 | - /test-resources
19 | url: https://ui5.sap.com
20 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
21 | - name: fiori-tools-appreload
22 | afterMiddleware: compression
23 | configuration:
24 | port: 35729
25 | path: webapp
26 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.simple.app.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.simple.app.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.simple.app.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-simple-app/simple.app/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Simple App
7 |
8 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/logout-page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Simple App - Logged off
7 |
8 |
9 | You have been logged off
10 |
11 |
12 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/simple.app/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "logout": {
5 | "logoutEndpoint": "/logout",
6 | "logoutPage": "/logout-page.html"
7 | },
8 | "routes": [
9 | {
10 | "source": "^/northwind/(.*)$",
11 | "target": "/$1",
12 | "authenticationType": "none",
13 | "destination": "northwind"
14 | },
15 | {
16 | "source": "^/index.html",
17 | "service": "html5-apps-repo-rt",
18 | "cacheControl": "no-cache, no-store, must-revalidate"
19 | },
20 | {
21 | "source": "^/logout-page.html$",
22 | "service": "html5-apps-repo-rt",
23 | "authenticationType": "none"
24 | },
25 | {
26 | "source": "^(.*)$",
27 | "target": "$1",
28 | "service": "html5-apps-repo-rt",
29 | "authenticationType": "xsuaa"
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/btp-samples-simple-app/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplessimpleapp",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.split.destination.app1
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplessplitdestinationapp1
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplessplitdestinationshared.btpsamplessplitdestinationlib
12 | src: "../../mta-shared/lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.destination.app1.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.destination.app1.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.destination.app1.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-split-destination/mta-app1/app1/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/app1/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^/api/documents/info$",
25 | "target": "info",
26 | "authenticationType": "xsuaa",
27 | "service": "btp.samples.consumed.service",
28 | "endpoint": "api"
29 | },
30 | {
31 | "source": "^(.*)$",
32 | "target": "$1",
33 | "service": "html5-apps-repo-rt",
34 | "authenticationType": "xsuaa"
35 | }
36 | ]
37 | }
38 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.destination.app1",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-split-destination-app1 --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app1/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplessplitdestinationapp1",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.split.destination.app2
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplessplitdestinationapp2
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplessplitdestinationshared.btpsamplessplitdestinationlib
12 | src: "../../mta-shared/lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.destination.app2.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.destination.app2.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.destination.app2.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-split-destination/mta-app2/app2/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/app2/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^/api/documents/info$",
25 | "target": "info",
26 | "authenticationType": "xsuaa",
27 | "service": "btp.samples.consumed.service",
28 | "endpoint": "api"
29 | },
30 | {
31 | "source": "^(.*)$",
32 | "target": "$1",
33 | "service": "html5-apps-repo-rt",
34 | "authenticationType": "xsuaa"
35 | }
36 | ]
37 | }
38 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.destination.app2",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-split-destination-app2 --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-app2/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplessplitdestinationapp2",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/README.md:
--------------------------------------------------------------------------------
1 | # BTPSamples
2 | This repository contains the 2nd sample project which is discussed in my blog https://blogs.sap.com/2022/02/08/designing-ui5-apps-for-sap-launchpad-service-part-2/
3 |
4 | To deploy this sample to your space
5 | - Login to cf cli
6 | - npm install
7 | - npm run build:mta
8 | - npm run deploy
9 | - Subscribe the Launchpad service to your sub account
10 | - Go to Launchpad configuration -> Content Providers and sync the HTML5 Apps provider
11 | - Configure the app for your site
12 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "btp.samples.split.destination.lib",
3 | "version": "0.0.1",
4 | "private": true,
5 | "sapuxLayer": "VENDOR",
6 | "description": "A shared library",
7 | "keywords": [
8 | "ui5",
9 | "openui5",
10 | "sapui5"
11 | ],
12 | "main": "webapp/index.html",
13 | "scripts": {
14 | "build": "ui5 build -a --clean-dest",
15 | "build:cf": "ui5 build preload --clean-dest --config ui5-deploy.yaml"
16 | },
17 | "devDependencies": {
18 | "@ui5/cli": "^3.8.0",
19 | "@ui5/fs": "^3.0.5",
20 | "@ui5/logger": "^3.0.0",
21 | "rimraf": "5.0.5",
22 | "ui5-task-zipper": "^3.1.1"
23 | },
24 | "ui5": {
25 | "dependencies": [
26 | "ui5-task-zipper"
27 | ]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/src/.library:
--------------------------------------------------------------------------------
1 |
2 |
3 | btp.samples.split.destination.lib
4 | SAP SE
5 | 1.0.0
6 | ${copyright}
7 | >title
8 |
9 |
10 |
11 | sap.ui.core
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/src/comp/reuse/Component.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/UIComponent",
3 | ], function (UIComponent) {
4 | "use strict";
5 |
6 | return UIComponent.extend("btp.samples.split.destination.lib.comp.reuse.Component", {
7 |
8 | metadata : {
9 | manifest : "json"
10 | },
11 |
12 | /**
13 | * The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
14 | * In this method, the device models are set and the router is initialized.
15 | * @public
16 | * @override
17 | */
18 | init : function () {
19 | // call the base component's init function and create the App view
20 | UIComponent.prototype.init.apply(this, arguments);
21 |
22 | },
23 |
24 | /**
25 | * The component is destroyed by UI5 automatically.
26 | * In this method, the ListSelector and ErrorHandler are destroyed.
27 | * @public
28 | * @override
29 | */
30 | destroy : function () {
31 | // call the base component's destroy function
32 | UIComponent.prototype.destroy.apply(this, arguments);
33 | }
34 | });
35 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/src/comp/reuse/controller/Main.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/mvc/Controller",
3 | "sap/ui/model/json/JSONModel"
4 | ], function (Controller, JSONModel) {
5 | "use strict";
6 |
7 | return Controller.extend("btp.samples.split.destination.lib.reuse.comp.controller.Main", {
8 |
9 |
10 | });
11 | });
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/src/comp/reuse/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.split.destination.lib.comp.reuse",
5 | "type": "component",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{appTitle}}",
8 | "description": "{{appDescription}}",
9 | "applicationVersion": {
10 | "version": "1.0.0"
11 | },
12 | "embeddedBy": "../../"
13 | },
14 |
15 | "sap.ui5": {
16 | "rootView": {
17 | "viewName": "btp.samples.split.destination.lib.comp.reuse.view.Main",
18 | "type": "XML",
19 | "async": true,
20 | "id": "main"
21 | },
22 | "dependencies": {
23 | "minUI5Version": "1.95.0",
24 | "libs": {
25 | "sap.ui.core": {},
26 | "sap.m": {},
27 | "btp.samples.split.destination.lib": {}
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/src/comp/reuse/view/Main.view.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/src/library.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ${copyright}
3 | */
4 |
5 | /**
6 | * Initialization Code and shared classes of library btp.samples.split.destination.lib.
7 | */
8 | sap.ui.define(["sap/ui/core/library"], // library dependency
9 | function () {
10 |
11 | "use strict";
12 |
13 | /**
14 | *
15 | *
16 | * @namespace
17 | * @name btp.samples.split.destination.lib
18 | * @author SAP SE
19 | * @version 1.0.0
20 | * @public
21 | */
22 |
23 | // delegate further initialization of this library to the Core
24 | sap.ui.getCore().initLibrary({
25 | name: "btp.samples.split.destination.lib",
26 | version: "1.0.0",
27 | dependencies: ["sap.ui.core"],
28 | noLibraryCSS: true,
29 | types: [],
30 | interfaces: [],
31 | controls: [
32 | "btp.samples.split.destination.lib.controls.Reuse"
33 | ],
34 | elements: []
35 | });
36 |
37 | /* eslint-disable */
38 | return btp.samples.split.destination.lib;
39 | /* eslint-enable */
40 |
41 | }, /* bExport= */ false);
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.split.destination.lib",
5 | "type": "library",
6 | "i18n": "messagebundle.properties",
7 | "title": "{{title}}",
8 | "applicationVersion": {
9 | "version": "1.0.0"
10 | },
11 | "embeds":["comp/reuse"]
12 | },
13 |
14 | "sap.ui5": {
15 | "dependencies": {
16 | "minUI5Version": "1.95.0",
17 | "libs": {
18 | "sap.ui.core": {},
19 | "sap.m": {},
20 | "sap.f": {}
21 | }
22 | }
23 | },
24 | "sap.cloud": {
25 | "public": true,
26 | "service": "btp.samples.split.destination.shared"
27 | }
28 | }
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/src/messagebundle.properties:
--------------------------------------------------------------------------------
1 | title=Shared library with reusable code
2 | ANY_TEXT=Client Id:
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.split.destination.lib
5 | type: library
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: buildThemes
17 | configuration:
18 | archiveName: btpsamplessplitdestinationlib
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/lib/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "authenticationMethod": "route",
3 | "routes": [
4 | {
5 | "source": "^(.*)$",
6 | "target": "$1",
7 | "service": "html5-apps-repo-rt",
8 | "authenticationType": "xsuaa"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.destination.shared",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-split-destination-shared --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/btp-samples-split-destination/mta-shared/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplessplitdestinationshared",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.split.mta.app1
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplessplitmtaapp1
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplessplitmta.btpsamplessplitmtalib
12 | src: "../../mta-shared/lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.mta.app1.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.mta.app1.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.mta.app1.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-split-mta/mta-app1/app1/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/app1/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.mta.app1",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-split-mta-app1 --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.split.mta.app2
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplessplitmtaapp2
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplessplitmta.btpsamplessplitmtalib
12 | src: "../../mta-shared/lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.mta.app2.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.mta.app2.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.mta.app2.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-split-mta/mta-app2/app2/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/app2/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-app2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.mta.app2",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-split-mta-app2 --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/README.md:
--------------------------------------------------------------------------------
1 | # BTPSamples
2 | This repository contains the 2nd sample project which is discussed in my blog https://blogs.sap.com/2022/02/08/designing-ui5-apps-for-sap-launchpad-service-part-2/
3 |
4 | To deploy this sample to your space
5 | - Login to cf cli
6 | - npm install
7 | - npm run build:mta
8 | - npm run deploy
9 | - Subscribe the Launchpad service to your sub account
10 | - Go to Launchpad configuration -> Content Providers and sync the HTML5 Apps provider
11 | - Configure the app for your site
12 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "btp.samples.split.mta.lib",
3 | "version": "0.0.1",
4 | "private": true,
5 | "sapuxLayer": "VENDOR",
6 | "description": "A shared library",
7 | "keywords": [
8 | "ui5",
9 | "openui5",
10 | "sapui5"
11 | ],
12 | "main": "webapp/index.html",
13 | "scripts": {
14 | "build": "ui5 build -a --clean-dest",
15 | "build:cf": "ui5 build preload --clean-dest --config ui5-deploy.yaml"
16 | },
17 | "devDependencies": {
18 | "@ui5/cli": "^3.8.0",
19 | "@ui5/fs": "^3.0.5",
20 | "@ui5/logger": "^3.0.0",
21 | "rimraf": "5.0.5",
22 | "ui5-task-zipper": "^3.1.1"
23 | },
24 | "ui5": {
25 | "dependencies": [
26 | "ui5-task-zipper"
27 | ]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/src/.library:
--------------------------------------------------------------------------------
1 |
2 |
3 | btp.samples.split.mta.lib
4 | SAP SE
5 | 1.0.0
6 | ${copyright}
7 | >title
8 |
9 |
10 |
11 | sap.ui.core
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/src/comp/reuse/Component.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/UIComponent",
3 | ], function (UIComponent) {
4 | "use strict";
5 |
6 | return UIComponent.extend("btp.samples.split.mta.lib.comp.reuse.Component", {
7 |
8 | metadata : {
9 | manifest : "json"
10 | },
11 |
12 | /**
13 | * The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
14 | * In this method, the device models are set and the router is initialized.
15 | * @public
16 | * @override
17 | */
18 | init : function () {
19 | // call the base component's init function and create the App view
20 | UIComponent.prototype.init.apply(this, arguments);
21 |
22 | },
23 |
24 | /**
25 | * The component is destroyed by UI5 automatically.
26 | * In this method, the ListSelector and ErrorHandler are destroyed.
27 | * @public
28 | * @override
29 | */
30 | destroy : function () {
31 | // call the base component's destroy function
32 | UIComponent.prototype.destroy.apply(this, arguments);
33 | }
34 | });
35 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/src/comp/reuse/controller/Main.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/mvc/Controller",
3 | "sap/ui/model/json/JSONModel"
4 | ], function (Controller, JSONModel) {
5 | "use strict";
6 |
7 | return Controller.extend("btp.samples.split.mta.lib.reuse.comp.controller.Main", {
8 |
9 |
10 | });
11 | });
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/src/comp/reuse/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.split.mta.lib.comp.reuse",
5 | "type": "component",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{appTitle}}",
8 | "description": "{{appDescription}}",
9 | "applicationVersion": {
10 | "version": "1.0.0"
11 | },
12 | "embeddedBy": "../../"
13 | },
14 |
15 | "sap.ui5": {
16 | "rootView": {
17 | "viewName": "btp.samples.split.mta.lib.comp.reuse.view.Main",
18 | "type": "XML",
19 | "async": true,
20 | "id": "main"
21 | },
22 | "dependencies": {
23 | "minUI5Version": "1.95.0",
24 | "libs": {
25 | "sap.ui.core": {},
26 | "sap.m": {},
27 | "btp.samples.split.mta.lib": {}
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/src/comp/reuse/view/Main.view.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/src/controls/ReuseRenderer.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ${copyright}
3 | */
4 |
5 | sap.ui.define([],
6 |
7 | function () {
8 | "use strict";
9 |
10 | /**
11 | * Reuse renderer.
12 | * @namespace
13 | */
14 | var ReuseRenderer = {};
15 |
16 | /**
17 | * Renders the HTML for the given control, using the provided
18 | * {@link sap.ui.core.RenderManager}.
19 | *
20 | * @param {sap.ui.core.RenderManager} oRm
21 | * the RenderManager that can be used for writing to
22 | * the Render-Output-Buffer
23 | * @param {sap.ui.core.Control} oControl
24 | * the control to be rendered
25 | */
26 | ReuseRenderer.render = function (oRm, oControl) {
27 |
28 | oRm.write("");
33 | oRm.write(sap.ui.getCore().getLibraryResourceBundle("btp.samples.split.mta.lib").getText("ANY_TEXT"));
34 |
35 | oRm.writeEscaped(oControl.getText());
36 | oRm.write("
");
37 |
38 | };
39 |
40 | return ReuseRenderer;
41 |
42 | }, /* bExport= */ true);
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/src/i18n/i18n.properties:
--------------------------------------------------------------------------------
1 | title=Shared library with reusable code
2 | ANY_TEXT=Reusable control from lib
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/src/library.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ${copyright}
3 | */
4 |
5 | /**
6 | * Initialization Code and shared classes of library btp.samples.split.mta.lib.
7 | */
8 | sap.ui.define(["sap/ui/core/library"], // library dependency
9 | function () {
10 |
11 | "use strict";
12 |
13 | /**
14 | *
15 | *
16 | * @namespace
17 | * @name btp.samples.split.mta.lib
18 | * @author SAP SE
19 | * @version 1.0.0
20 | * @public
21 | */
22 |
23 | // delegate further initialization of this library to the Core
24 | sap.ui.getCore().initLibrary({
25 | name: "btp.samples.split.mta.lib",
26 | version: "1.0.0",
27 | dependencies: ["sap.ui.core"],
28 | noLibraryCSS: true,
29 | types: [],
30 | interfaces: [],
31 | controls: [
32 | "btp.samples.split.mta.lib.controls.Reuse"
33 | ],
34 | elements: []
35 | });
36 |
37 | /* eslint-disable */
38 | return btp.samples.split.mta.lib;
39 | /* eslint-enable */
40 |
41 | }, /* bExport= */ false);
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.split.mta.lib",
5 | "type": "library",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{title}}",
8 | "applicationVersion": {
9 | "version": "1.0.0"
10 | },
11 | "embeds":["comp/reuse"]
12 | },
13 |
14 | "sap.ui5": {
15 | "dependencies": {
16 | "minUI5Version": "1.95.0",
17 | "libs": {
18 | "sap.ui.core": {},
19 | "sap.m": {},
20 | "sap.f": {}
21 | }
22 | }
23 | },
24 | "sap.cloud": {
25 | "public": true,
26 | "service": "btp.samples.split.mta"
27 | }
28 | }
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.split.mta.lib
5 | type: library
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: buildThemes
17 | configuration:
18 | archiveName: btpsamplessplitmtalib
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/lib/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "authenticationMethod": "route",
3 | "routes": [
4 | {
5 | "source": "^(.*)$",
6 | "target": "$1",
7 | "service": "html5-apps-repo-rt",
8 | "authenticationType": "xsuaa"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.mta.shared",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-split-mta-shared --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/btp-samples-split-mta/mta-shared/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplessplitmta",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.split.xsuaa.app1
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplessplitxsuaaapp1
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplessplitxsuaashared.btpsamplessplitxsuaalib
12 | src: "../../mta-shared/lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.xsuaa.app1.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.xsuaa.app1.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.xsuaa.app1.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-split-xsuaa/mta-app1/app1/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/app1/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.xsuaa.app1",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-split-xsuaa-app1 --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app1/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplessplitxsuaaapp1",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.split.xsuaa.app2
5 | type: application
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: generateCachebusterInfo
17 | configuration:
18 | archiveName: btpsamplessplitxsuaaapp2
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/ui5-local.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | framework:
6 | name: SAPUI5
7 | version: '1.95.0'
8 | libraries:
9 | - name: sap.f
10 | - name: sap.m
11 | - name: sap.suite.ui.generic.template
12 | - name: sap.ui.comp
13 | - name: sap.ui.core
14 | - name: sap.ui.generic.app
15 | - name: sap.ui.table
16 | - name: sap.ushell
17 | - name: themelib_sap_fiori_3
18 | server:
19 | customMiddleware:
20 | - name: fiori-tools-proxy
21 | afterMiddleware: compression
22 | configuration:
23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
24 | backend:
25 | - path: /northwind
26 | pathPrefix: /
27 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
28 | - name: fiori-tools-appreload
29 | afterMiddleware: compression
30 | configuration:
31 | port: 35729
32 | path: webapp
33 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/ui5.yaml:
--------------------------------------------------------------------------------
1 | specVersion: '3.0'
2 | metadata:
3 | name: 'simple.app'
4 | type: application
5 | server:
6 | customMiddleware:
7 | - name: fiori-tools-servestatic
8 | afterMiddleware: compression
9 | configuration:
10 | paths:
11 | - path: /btpsamplessplitxsuaashared.btpsamplessplitxsuaalib
12 | src: "../../mta-shared/lib/src"
13 | - name: fiori-tools-proxy
14 | afterMiddleware: compression
15 | configuration:
16 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
17 | backend:
18 | - path: /northwind
19 | pathPrefix: /
20 | url: https://services.odata.org/V3/Northwind/Northwind.svc/
21 | ui5:
22 | path:
23 | - /resources
24 | - /test-resources
25 | url: https://ui5.sap.com
26 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version
27 | - name: fiori-tools-appreload
28 | afterMiddleware: compression
29 | configuration:
30 | port: 35729
31 | path: webapp
32 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/controller/DetailObjectNotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.xsuaa.app2.controller.DetailObjectNotFound", {});
7 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/controller/DetailObjectNotFound.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.xsuaa.app2.controller.DetailObjectNotFound", {});
7 | });
8 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/controller/NotFound.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "./BaseController"
3 | ], function (BaseController) {
4 | "use strict";
5 |
6 | return BaseController.extend("btp.samples.split.xsuaa.app2.controller.NotFound", {
7 |
8 | onInit: function () {
9 | this.getRouter().getTarget("notFound").attachDisplay(this._onNotFoundDisplayed, this);
10 | },
11 |
12 | _onNotFoundDisplayed : function () {
13 | this.getModel("appView").setProperty("/layout", "OneColumn");
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/images/logo_ui5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAP-samples/btp-launchpad-ui-samples/95418af5e553bc90e8398f1e90b8d5136d7803b1/btp-samples-split-xsuaa/mta-app2/app2/webapp/images/logo_ui5.png
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/model/formatter.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([], function () {
2 | "use strict";
3 |
4 | return {
5 | /**
6 | * Rounds the currency value to 2 digits
7 | *
8 | * @public
9 | * @param {string} sValue value to be formatted
10 | * @returns {string} formatted currency value with 2 digits
11 | */
12 | currencyValue : function (sValue) {
13 | if (!sValue) {
14 | return "";
15 | }
16 |
17 | return parseFloat(sValue).toFixed(2);
18 | }
19 | };
20 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/model/models.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/model/json/JSONModel",
3 | "sap/ui/Device"
4 | ], function (JSONModel, Device) {
5 | "use strict";
6 |
7 | return {
8 | createDeviceModel : function () {
9 | var oModel = new JSONModel(Device);
10 | oModel.setDefaultBindingMode("OneWay");
11 | return oModel;
12 | }
13 | };
14 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/view/App.view.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/view/DetailObjectNotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/view/NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/webapp/view/ViewSettingsDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/app2/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "welcomeFile": "/index.html",
3 | "authenticationMethod": "route",
4 | "routes": [
5 | {
6 | "source": "^/northwind/(.*)$",
7 | "target": "/$1",
8 | "authenticationType": "none",
9 | "destination": "northwind"
10 | },
11 | {
12 | "source": "^/resources/(.*)$",
13 | "target": "/resources/$1",
14 | "authenticationType": "none",
15 | "destination": "ui5"
16 | },
17 | {
18 | "source": "^/test-resources/(.*)$",
19 | "target": "/test-resources/$1",
20 | "authenticationType": "none",
21 | "destination": "ui5"
22 | },
23 | {
24 | "source": "^(.*)$",
25 | "target": "$1",
26 | "service": "html5-apps-repo-rt",
27 | "authenticationType": "xsuaa"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.xsuaa.app2",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-split-xsuaa-app2 --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-app2/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplessplitxsuaaapp2",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/README.md:
--------------------------------------------------------------------------------
1 | # BTPSamples
2 | This repository contains the 2nd sample project which is discussed in my blog https://blogs.sap.com/2022/02/08/designing-ui5-apps-for-sap-launchpad-service-part-2/
3 |
4 | To deploy this sample to your space
5 | - Login to cf cli
6 | - npm install
7 | - npm run build:mta
8 | - npm run deploy
9 | - Subscribe the Launchpad service to your sub account
10 | - Go to Launchpad configuration -> Content Providers and sync the HTML5 Apps provider
11 | - Configure the app for your site
12 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | .scp/
4 | .env
5 | Makefile*.mta
6 | mta_archives
7 | mta-*
8 | resources
9 | archive.zip
10 | .*_mta_build_tmp
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "btp.samples.split.xsuaa.lib",
3 | "version": "0.0.1",
4 | "private": true,
5 | "sapuxLayer": "VENDOR",
6 | "description": "A shared library",
7 | "keywords": [
8 | "ui5",
9 | "openui5",
10 | "sapui5"
11 | ],
12 | "main": "webapp/index.html",
13 | "scripts": {
14 | "build": "ui5 build -a --clean-dest",
15 | "build:cf": "ui5 build preload --clean-dest --config ui5-deploy.yaml"
16 | },
17 | "devDependencies": {
18 | "@ui5/cli": "^3.8.0",
19 | "@ui5/fs": "^3.0.5",
20 | "@ui5/logger": "^3.0.0",
21 | "rimraf": "5.0.5",
22 | "ui5-task-zipper": "^3.1.1"
23 | },
24 | "ui5": {
25 | "dependencies": [
26 | "ui5-task-zipper"
27 | ]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/src/.library:
--------------------------------------------------------------------------------
1 |
2 |
3 | btp.samples.split.xsuaa.lib
4 | SAP SE
5 | 1.0.0
6 | ${copyright}
7 | >title
8 |
9 |
10 |
11 | sap.ui.core
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/src/comp/reuse/Component.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/UIComponent",
3 | ], function (UIComponent) {
4 | "use strict";
5 |
6 | return UIComponent.extend("btp.samples.split.xsuaa.lib.comp.reuse.Component", {
7 |
8 | metadata : {
9 | manifest : "json"
10 | },
11 |
12 | /**
13 | * The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
14 | * In this method, the device models are set and the router is initialized.
15 | * @public
16 | * @override
17 | */
18 | init : function () {
19 | // call the base component's init function and create the App view
20 | UIComponent.prototype.init.apply(this, arguments);
21 |
22 | },
23 |
24 | /**
25 | * The component is destroyed by UI5 automatically.
26 | * In this method, the ListSelector and ErrorHandler are destroyed.
27 | * @public
28 | * @override
29 | */
30 | destroy : function () {
31 | // call the base component's destroy function
32 | UIComponent.prototype.destroy.apply(this, arguments);
33 | }
34 | });
35 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/src/comp/reuse/controller/Main.controller.js:
--------------------------------------------------------------------------------
1 | sap.ui.define([
2 | "sap/ui/core/mvc/Controller",
3 | "sap/ui/model/json/JSONModel"
4 | ], function (Controller, JSONModel) {
5 | "use strict";
6 |
7 | return Controller.extend("btp.samples.split.xsuaa.lib.reuse.comp.controller.Main", {
8 |
9 |
10 | });
11 | });
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/src/comp/reuse/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.split.xsuaa.lib.comp.reuse",
5 | "type": "component",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{appTitle}}",
8 | "description": "{{appDescription}}",
9 | "applicationVersion": {
10 | "version": "1.0.0"
11 | },
12 | "embeddedBy": "../../"
13 | },
14 |
15 | "sap.ui5": {
16 | "rootView": {
17 | "viewName": "btp.samples.split.xsuaa.lib.comp.reuse.view.Main",
18 | "type": "XML",
19 | "async": true,
20 | "id": "main"
21 | },
22 | "dependencies": {
23 | "minUI5Version": "1.95.0",
24 | "libs": {
25 | "sap.ui.core": {},
26 | "sap.m": {},
27 | "btp.samples.split.xsuaa.lib": {}
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/src/comp/reuse/view/Main.view.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/src/i18n/i18n.properties:
--------------------------------------------------------------------------------
1 | title=Shared library with reusable code
2 | ANY_TEXT=Reusable control from lib
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/src/library.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ${copyright}
3 | */
4 |
5 | /**
6 | * Initialization Code and shared classes of library btp.samples.split.xsuaa.lib.
7 | */
8 | sap.ui.define(["sap/ui/core/library"], // library dependency
9 | function () {
10 |
11 | "use strict";
12 |
13 | /**
14 | *
15 | *
16 | * @namespace
17 | * @name btp.samples.split.xsuaa.lib
18 | * @author SAP SE
19 | * @version 1.0.0
20 | * @public
21 | */
22 |
23 | // delegate further initialization of this library to the Core
24 | sap.ui.getCore().initLibrary({
25 | name: "btp.samples.split.xsuaa.lib",
26 | version: "1.0.0",
27 | dependencies: ["sap.ui.core"],
28 | noLibraryCSS: true,
29 | types: [],
30 | interfaces: [],
31 | controls: [
32 | "btp.samples.split.xsuaa.lib.controls.Reuse"
33 | ],
34 | elements: []
35 | });
36 |
37 | /* eslint-disable */
38 | return btp.samples.split.xsuaa.lib;
39 | /* eslint-enable */
40 |
41 | }, /* bExport= */ false);
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_version": "1.60.0",
3 | "sap.app": {
4 | "id": "btp.samples.split.xsuaa.lib",
5 | "type": "library",
6 | "i18n": "i18n/i18n.properties",
7 | "title": "{{title}}",
8 | "applicationVersion": {
9 | "version": "1.0.0"
10 | },
11 | "embeds":["comp/reuse"]
12 | },
13 |
14 | "sap.ui5": {
15 | "dependencies": {
16 | "minUI5Version": "1.95.0",
17 | "libs": {
18 | "sap.ui.core": {},
19 | "sap.m": {},
20 | "sap.f": {}
21 | }
22 | }
23 | },
24 | "sap.cloud": {
25 | "public": true,
26 | "service": "btp.samples.split.xsuaa.shared"
27 | }
28 | }
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/ui5-deploy.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2 | specVersion: '3.0'
3 | metadata:
4 | name: btp.samples.split.xsuaa.lib
5 | type: library
6 | resources:
7 | configuration:
8 | propertiesFileSourceEncoding: UTF-8
9 | builder:
10 | resources:
11 | excludes:
12 | - "/test/**"
13 | - "/localService/**"
14 | customTasks:
15 | - name: ui5-task-zipper
16 | afterTask: buildThemes
17 | configuration:
18 | archiveName: btpsamplessplitxsuaalib
19 | additionalFiles:
20 | - xs-app.json
21 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/lib/xs-app.json:
--------------------------------------------------------------------------------
1 | {
2 | "authenticationMethod": "route",
3 | "routes": [
4 | {
5 | "source": "^(.*)$",
6 | "target": "$1",
7 | "service": "html5-apps-repo-rt",
8 | "authenticationType": "xsuaa"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "split.xsuaa.shared",
3 | "version": "0.0.1",
4 | "private": true,
5 | "keywords": [
6 | "ui5",
7 | "openui5",
8 | "sapui5"
9 | ],
10 | "scripts": {
11 | "deploy": "fiori cfDeploy",
12 | "build:mta": "rimraf resources mta_archives && mbt build --mtar archive",
13 | "undeploy": "cf undeploy btp-samples-split-xsuaa-shared --delete-services --delete-service-keys"
14 | },
15 | "devDependencies": {
16 | "rimraf": "5.0.5",
17 | "mbt": "^1.2.27"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/btp-samples-split-xsuaa/mta-shared/xs-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "xsappname": "btpsamplessplitxsuaashared",
3 | "tenant-mode": "dedicated",
4 | "description": "Security profile of called application",
5 | "scopes": [
6 | ],
7 | "role-templates": [
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------