Skip to Content

duplicate id error while viewing tile in launchpad for 2nd time

Whenever clicking on a tile for 2nd time in a fiori launchpad , I am getting the duplicate id error for few controls. I searched on SCN and accordingly tried with createId() but still the error perists (it shows duplicate id for <viewid>--<id> in console error) which means even the id's generated using createId having the view id prefixed to it are also not getting cleared when the application is exited in 1st attempt

Strangely though , I have declared number of controls in my app using hardcoded id's but the duplicate id comes only for few controls like BusyDialog , OverlayDailog , Carousel and Label. The error does not come for sap.m.List which is also having a hardcoded id.

Regards

Amber

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 14, 2016 at 10:22 AM

    Hi Amber,

    I had this problem also. But I can't remember how I fixed it 😀.

    Does your component.js have:

    destroy: function() { this._oErrorHandler.destroy(); //only if you have one // call the base component's destroy function UIComponent.prototype.destroy.apply(this, arguments);

    },

    Try this pls.

    Regards

    Samuel

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Amber,

      New question, new Discussion please. This thread is now locked. Your new Discussion should probably link back to this one for historical perspective.

      NOTE: Getting the link is easy enough for both the author and Blog. Simply MouseOver the item, Right Click, and select Copy Shortcut. Paste it into your Discussion. You can also click on the url after pasting. Click on the A to expand the options and select T (on the right) to Auto-Title the url.

      Thanks, Mike (Moderator)

      SAP Technology RIG

  • Apr 14, 2016 at 10:29 AM

    the reason for duplicate ids is if you have 2 views and you use the same id, that may cause duplicate ids. you can solve it by making it unique through your application (recommended) or... by using a dynamic id (don't assign one - do not recommend as you may need to reference your objects via ID)

    Add comment
    10|10000 characters needed characters exceeded

    • The views arent getting destroyed but the program wanna open it again as you click on your tile. That's why it will be duplicated. As i mentioned try the destroy function. Should get called automatically.

      Regards

      Samuel