Skip to Content

How to post form data on button click

Hi Everyone,

How to post form Data on button click

and controller code is

OnDashp: function() {
			console.log("hi");
			console.log(this.getView().getModel('oModel'));
}

view code is

	<content>
					<sap.ui.layout.form:SimpleForm xmlns:sap.ui.layout.form="sap.ui.layout.form" editable="true" layout="ResponsiveGridLayout" id="__form0">
						<sap.ui.layout.form:content>
							<core:Title text="Title" id="__title0"/>
							<Label text="{i18n>appTitle}" id="__label0"/>
							<Input width="100%" id="__input1" required="true" showSuggestion="true" showValueStateMessage="false" suggestionRowValidator="onselect"
								value="{i18n>appTitle}"/>
							<Label text="{EmployeeData>/employeeName}" id="__label1"/>
							<Input width="100%" id="__input2" value="{EmployeeData>/employeeName}"/>
							<Label text="{data>/Product/0/name}" id="__label3"/>
							<Button text="Button" width="100%" id="__button0" press="OnDashp"/></sap.ui.layout.form:content>
					</sap.ui.layout.form:SimpleForm>
				</content>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer