Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

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

$
0
0


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);

 

this.getView().addDependent(this.HelpDialog);

 

   };

 

 

Home Controller.JS

 

 

  onDialogPress: function() {

 

this.HelpDialog.open();

  },

 

 

onHelpSelect: function(oEvent) {

 

 

  var selectedItem = oEvent.getParameters().listItem;

 

  var HelpType = selectedItem.data("HelpType");

 

 

My logic is here

}

},

 

 

closeAlert: function(oEvent) {

 

 

oEvent.getSource().getParent().close();

  }

 

 

 

 

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.

 

Thanks
Srithar.


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>