Skip to Content
0

How to post form data on button click

Dec 06, 2017 at 12:37 PM

32

avatar image

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>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jamie Cawley
Dec 06, 2017 at 01:21 PM
0

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-backend

Regards,

Jamie

Share
10 |10000 characters needed characters left characters exceeded