on ‎2019 Sep 16 11:39 PM
Hi,
Below is my code. I want to capture the input filed value from my Dialog control and pass it to another function (that.submitPrograms). I know this can be done by creating a new fragment file and then get the value of the Input field using this.getView().byId(<ID>), but want to create the dialog and controls in the dialog dynamically in the controller (runtime). If this is not possible to capture Input filed value and pass it to another function with in the controller, please let me know..I will create a fragment file then. Thanks
var oDialog = new sap.m.Dialog({content:[new sap.m.Input({maxLength:1000})],
title: "Please Enter Comments",
verticalScrolling:true,
beginButton: new sap.m.Button({text:"Submit", press: function(){that.submitPrograms();}}),
endButton: new sap.m.Button({text: "Cancel", press: function(){this.getParent().close();}})
});
oDialog.open();
Request clarification before answering.
don't pass data here and there....
put them in model, and always go through binding...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok. So that is what I am trying to understand.
How can I get the value of the input field (which is in the dialog box) ? I cannot assign an ID to this input filed, as every time I run it creates a duplicate ID and throws error. So basically two questions in the above scenario..
How to get the entered value of the input field (which is in the dialog box) and then how can I bind it or send it to another function ( which in this case is submitPrograms() )
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.