Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8644

Re: Get ID of element in runtime

$
0
0

Hi Arie,

 

If you are adding chart to the page content aggregation then it would be placed at the last element of content array.

Try something like this (Just a guess):

 

var oPage = sap.ui.getCore().byId("oPage");          //Get Hold of Page Control
var oContent = oPage.getContent();                         //Gets the Page Conent
var oLastElement = oContent.slice(-1)[0]                    //Fetches the last element in content aggregation, which will be chart that is created
var oChartID = oLastElement.getId();
console.log(oChartID);

Regards,

Sai Vellanki.


Viewing all articles
Browse latest Browse all 8644

Trending Articles



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