cancel
Showing results for 
Search instead for 
Did you mean: 

How to post form data on button click

0 Kudos

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>

Accepted Solutions (0)

Answers (1)

Answers (1)

jamie_cawley
Advisor
Advisor
0 Kudos

Have you tried searching for an answer? There are many examples on this site, the help docs, as well as others.

https://help.sap.com/saphelp_nw74/helpdata/en/91/f2a6ac6f4d1014b6dd926db0e91070/frameset.htm

https://stackoverflow.com/questions/25886479/sapui5-omodel-create-how-to-post-data-to-the-sap-backen...

Regards,

Jamie