Skip to Content
Sep 07, 2018 at 01:10 PM

Reset Button for form Container with different controls


Hi, I have a form container with a lot of different controls, like ComboBoxes, RadioButtons, CheckBoxes and TextAreas. I want to have a button for reseting all the controls in the form. I am able to reset each control separately like this:

resetPanel: function(){  
this.byId("ComboBox").setSelectedKey(); }

But there are too many controls for doing it to each one separately. Is there any way to do it in the whole form?

I tried this:

var panel = sap.ui.getCore().byId("Form1");

but I get the error that panel is Undefined.
Does anyone have any idea?