Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Call XML View ui elements from controller

Hi,

I used to call and do operations on ui elements by accessing them from controller using below syntax.

this.getView().byId("txtid");

Most of the times , I am able to access UI Elements with above syntax and write validations as well but some times , it is not useful to read panel/tiles by using above syntax.

Are there any known restrictions/limitations in using above syntax?. Are there any alternative ways to call XML View UI Elements from controller,please suggest me.

Regards,

Koti Reddy

Former Member
Former Member replied

Hi,

Thank you for your suggestion but If we work with xml views,The only way to access ui element is with their ID's if any validations needed.

I got other syntax as well with which I overcome d above issues.

sap.ui.getCore().byId("viewid").byId("txtid");

Regards,

Koti Reddy

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question