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

Re: Is it possible to use addEventDelegate for register onAfterRendering for entire view instead of individual controls?

$
0
0

Srinivas,

 

May I know the reason, why are you using placeAt method inside view and controller. I see your code inside the view as -

 

// attach it to some element in the page
oTextView.placeAt("content");

And in controller also, I see it as - 

 

drawTable: function(oData) {        //alert(JSON.stringify(oData));        var oModel = new sap.ui.model.json.JSONModel();        oModel.setData(oData);        oTable.setModel(oModel);        oTable.bindRows("/root");        oTable.placeAt("sample1");       
}

Remove the above placeAt methods from both and do in index.html as

var oView = sap.ui.jsview("oui5mvc.dragndropwithmvc");
oView.placeAt("content");

After doing few changes in your code, addEventDelegate is able to hit. Check the sample here - Plunker

 

Regards,

Sai Vellanki.


Viewing all articles
Browse latest Browse all 9129

Trending Articles



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