Skip to Content

SAPUI5 sam.m.Input.submit() does not work

Hello All,

Currently I want to create a function to handle when user press 'Enter' on Input field (sap.m.Input). I found this suitable function submit() in the API.

However it didn't work, I tried but nothing happen. I pressed enter but it does not call the responding function.

Here my code:


<mvc:View controllerName="Test.controller.App" xmlns:html="" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m">
			<Page title="{i18n>title}">
					<Input onsapenter='onSubmit'/>


], function(Controller) {
	"use strict";

	return Controller.extend("Test.controller.App", {
		onSubmit: function(oEvent){



I pressed enter but nothing showed in the console.

I'm looking for help from your expert experience. Is the submit() function does not work anymore? Is there another function to solve my question?

Thanks a lot!


Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 12, 2017 at 06:17 AM

    Hi Victor,

    "onsapenter" event is not avaliable in sap.m.Input. For your requirement, you can go with "sap.m.Input.submit()". Change the below piece of code, try once..

    <Input submit="onSubmit" />
    Add comment
    10|10000 characters needed characters exceeded