Skip to Content
0
Dec 06, 2016 at 06:31 PM

How to pass sap.ui.commons.Button Press event values to onSubmit function

159 Views Last edit May 27, 2020 at 08:31 AM 3 rev

This is a Javascript newbie question. I do not know how to pass and/or read the inputName and inputComments values in the onSubmit function:

var oButton = new sap.ui.commons.Button({

text: "Submit",

press: function(){

oController.onSubmit.apply(oController, {

inputName: oNameInput.getValue(),

inputComments: oCommentsInput.getValue()

});

}