on 07-10-2017 6:00 AM
i am begginer to sap ui5.
i tried so many ways. like sap.ui.getCore().byId("control id"); and this.getView().byId("control id"); like that but i am getting error as undefined.
Hi Chandeep
you can do this
var oView = sap.ui.getCore().byId('<view Id>'); // this gives you the view
var oController = oView.getController();
I do not know what you intend to do with this. I do not suggest that you try to call function of the controller directly.
Thanks
-D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
your title and content really don't match
what's your problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
don't access the ui control in your controller(unless you have no choice)
if you really want.... use event to inform the first view controller to do the job
Hi,
I guess you are trying to access data of a view from other view. If this is the case then probably I would suggest to make use of the MODELs to access data .
Thanks,Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.