I am using this.createID("") to generate ID for the elements/controls in my JSviews and using view.byID() to reference them only problem is what is
the best way to get the reference for the "view". ?
for example
View1 has table control and we need to modify(apply filter) to that table control from the View 2's controller
the way I have handled this is
In View 2 I am declaring (or creating new instance for the view 1 )
var x = sap.ui.view (........params for view 1........ );
passing x to the function in controller of View 2
then using the below statement
x.byId("tableControlID").someMethodl(); |
this works but in a complicated scenario when there can be nested creation of new view instances it gives run time error
for example
View2 has new instance of view 1 and View1 has new instance of View2 ( this leads to deadlock situation )
What is the best way to get reference to View1 without having to create new instance of it?
Regards,
Amit.