cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to access default values / user parameters from the Fiori Launchpad in Fiori Elements

lutzfe
Discoverer
0 Kudos
315

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 

View Entire Topic
junwu
Active Contributor
0 Kudos

 

if it is v2, check if this component can give you access to component data.

this.getView().getController().getOwnerComponent().getAppComponent()

lutzfe
Discoverer
0 Kudos
Then we're back to freestyle code... I would like to know if there is a way to use them in Fiori Elements without further coding.