Last active
August 29, 2015 14:10
-
-
Save qmacro/297c350acc770cdc7013 to your computer and use it in GitHub Desktop.
OTT FP in #UI5?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get a list of all the aggregated pages in a SplitApp | |
// ---------------------------------------------------- | |
// oSplitAppControl is a ref to the instantiated SplitApp | |
// with an XML View in the masterPages aggregation | |
// and two XML Views in the detailPages aggregation | |
["getMasterPages", "getDetailPages"] | |
// Call the relevant functions to get the master & detail page aggregations content | |
.map(function(fn) { | |
return oSplitAppControl[fn](); | |
}) | |
// Flatten the results into a single list | |
.reduce(function(allpages, pagelist) { | |
return allpages.concat(pagelist); | |
}) | |
// Do something with them (here, just show the IDs) | |
.map(function(oPage) { | |
return oPage.sId; | |
}) | |
// => ["__xmlview0--Master", "__xmlview0--Welcome", "__xmlview0--Detail"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment