Skip to Content

Id's of UI-Controls are changing during runtime

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Mar 31, 2015 at 04:26 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 31, 2015 at 07:49 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 01, 2015 at 07:25 AM

    in controller

    this.byId("idAppControl")

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.