on ‎2018 Oct 22 10:46 AM
Hi all,
I am facing an issue reading the fiori tile parameters(not target mapping parameters) in an annotation based UI5 application.
For example I m keeping the parameter name as "param1".
By default UI5 template has chosen sap.ui.generic.app.AppComponent component for annotaion based development.
Initially I have kept the parameters in target mapping of the fiori tile. Then I was able to read the parameter in the controller init itself by using below code:
var param1= jQuery.sap.getUriParameters().get("param1");
Now I am in a situation to keep the parameter in "fiori tile parameter" section like this: param1=TEST . This parameter we can read through Component.js only.
sap.ui.generic.app.AppComponent.extend("abc.Component", {
init: function() {
var urlParam = {};
var oComponentData = this.getComponentData();
oComponentData.startupParameters.param1;
}
});
But this init is not getting called. When I replace sap.ui.generic.app.AppComponent with
sap.ui.core.UIComponent, init is getting called and param1 is getting read. But annotations are not working. Kindly suggest a solution.
Request clarification before answering.
Hi Sakthi,
I was not able to hook into the init-method in a generic app lifecycle as well. But onBeforeRendering is called, which worked in my case. Maybe this is a workaround for you, too.
Best regards,
Christian.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 5 | |
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.