Skip to Content
Feb 08, 2016 at 02:09 AM

Uncaught Error: Error: adding element with duplicate id 'HelpType'


i want to show the help dialogue popup in Home, Master, Details pages.,

for that i placed the help button in 3 respective views Header


when the user clicks on help it show dialogue popup and user can select the value , i am trying to implement this .

For help dialogue i have created fragment.

please Find the following code:

Home View.XML:

onInit: function()

xmlfragment("sap.ui5.myapp.fragments.HelpDialog", this);



Home Controller.JS

onDialogPress: function() {;


onHelpSelect: function(oEvent) {

var selectedItem = oEvent.getParameters().listItem;

var HelpType ="HelpType");

My logic is here



closeAlert: function(oEvent) {



This logic is working fine for home view i am able to click help icon and choose the value without any error.

when i click to navigate from home view to master view i am getting the error like Uncaught Error: Error: adding element with duplicate id 'HelpType' - when i click to navigate second time its working fine

i need to implement the same functionality to master and detail controller.

how can i solve this issue please help me the same.any sample code would be appreciate.