on 11-17-2015 11:27 AM
Hi UI5 Developers,
Kindly help me out in this use case.
I have a table in its toolbar I have placed 2 buttons. On the first button, I open a dialog box with three text fields, and on submit the three values are getting stored in a model. Once I close the dialog and open it again I am getting duplicate ID error for the textfields. And also I should add the second time values also to same session. Kindly share your ideas to solve it out.
Table with two buttons
Adding data to dialog box
Values got entered into table through JSON format
Selecting the Add button again, below error is displayed. (packagest is id of first textfield in dialog box)
Hi Rheema,
Try -
var oDialog = new sap.m.Dialog("packagest",{
afterClose: function(){
oDialog.destroy();
}});
(or)
var oDialog = sap.ui.getCore().byId("packagest");
if(!oDialog){
//create your dialog control here
}
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Rheema, please create the dialog in your view, not in the event of your controller. also, make sure you have a unique id in each control. once you create the dialog in the view, then in your controller open event, you may do the open function.. or close function.. this ensures you create it only once and you interact with the dialog via events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.