Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

dynamically selecting fragment

$
0
0

Hi All,

We are starting to work on a Fiori App where we have a Master Detail page. As it is common with the detail section we also have a table, which displays some data. For us, this table could have different layout (when a different issue is selected in the Master section) while other information on the detail page remains same. So i am planning to use fragments (which would contain table) in the view and will have different fragments for different layouts (which are fixed). But i am struggling to find how to dynamically select specific fragment when specific issue would be selected from the Master List.

For e.g. I would have 1 master view, 1 detail view and 4 fragments (corresponding to 4 issues we have). In the master list i would see those 4 issues and when i select any of them, the detail view and the corresponding fragment would be displayed. Is it possible to select any fragment or do i have to include all the fragments in the Detail view and then maybe make it visible and invisible.

 

I am planning to have only fragments (and not separate views for every issue) because maybe we would not require seperate controllers for those table as it contains some basic data for display.

 

I am new to Fiori development so i would appreciate if you could provide me with some code snipplets on how to dynamically select fragments. Thanks.

 

Regards,

Ashish


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>