cancel
Showing results for 
Search instead for 
Did you mean: 

Id's of UI-Controls are changing during runtime

0 Kudos

Hi at all,

I have a little question concerning the id of my splitapp. I created a Component like it is described in the UI5 SDK - Best Practises section. There I created an App.view.xml with a SplitApp-Control with the id "idAppControl". Everything works fine but during runtime the id is changing to "__xmlview0--idAppControl".

I want to use the id in my controller to change the UI, so do I need to use this generated id to work with? There has to be a way to use the id's that you settet up during devtime right?

Kind Regards

Dominik

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182372
Active Contributor
0 Kudos

in controller

this.byId("idAppControl")

Qualiture
Active Contributor
0 Kudos

Although I would advise to use references to ID's to a minimum, you could still reference it in XML views:

use this.getView().byId("idAppControl") instead

santhu_gowdaz
Active Contributor
0 Kudos

you are using xml view,so the id is generated with the view id, if you use ur id some times won't work.so, use generated id.