on 2024 Jul 15 10:22 AM
Hi,
in SAPUI5 you can easily reach the default values from the Fiori Launchpad / BTP Work Zone.
Is this also possible for Fiori Elements? Is there any annotation which i can set or something?
Or do i have to extend my application with the Flexible Programming Model and access the values in a Freestyle Controller?
After a long search i could not find the answer...
Here how i access the default values in SAPUI5 Freestyle:
this.componentData = this.getOwnerComponent()?.getComponentData();
this.startupParameters = this.componentData.startupParameters;
if(this.startupParameters.WERKS){
this.werksInput.setValue(this.startupParameters.WERKS);
MessageToast.show("Default Value WERKS used: " +
this.startupParameters.WERKS);
}
Thanks
if it is v2, check if this component can give you access to component data.
this.getView().getController().getOwnerComponent().getAppComponent()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.