Hi Suganya,
Do not destroy and re-create the view each time you navigate, this will result in slow performance of App. Place the logic in onAfterRendering event:
onAfterRendering: function(oEvent){ //your logic }
if the above method doesn't work, then you can give a try with this as well:
onInit: function(oEvent){ var oView = this.getView(); oView.addEventDelegate({ onAfterShow: function(oEvent){ //your logic } }, oView); }
Regards,
Sai Vellanki.