<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: UI5 Input and submit event in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485072#M85541</link>
    <description>&lt;P&gt;Yes, to the question of entering something into the field before hitting the [Enter] key, and, yes to binding, in that I have model bound to the table for &amp;lt;Input&amp;gt; and the input is using the format value="{alias&amp;gt;field}".&lt;/P&gt;&lt;P&gt;So yes, there is a binding from a model to the table within the controller, but the controller is not bound to the XML in the controller, but we do have an entry in the XML like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;controllerName="path.controller.controllerViewName"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hopefully that's what you mean by binding the controller to the view. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In theory though, it should still work for any &amp;lt;Input&amp;gt; without a binding to a model via the controller. But either way, it's not working.&lt;/P&gt;&lt;P&gt;As usual, there is very little out there on this subject, and no examples that I can find for using the submit event with &amp;lt;Input&amp;gt;, using XML. &lt;/P&gt;&lt;P&gt;[Appended later...] I have also  tried this code in my controller, but still it does not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;//Execute the onMySearch function when [Enter] is pressed, to save having to hit the button. 
this.getView().byId("searchRef").onsapenter = function() {
	onMySearch(); 
	};	
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 28 Mar 2017 16:40:15 GMT</pubDate>
    <dc:creator>gary_king2</dc:creator>
    <dc:date>2017-03-28T16:40:15Z</dc:date>
    <item>
      <title>UI5 Input and submit event</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaq-p/485070</link>
      <description>&lt;P&gt;According to the &lt;A href="https://openui5.hana.ondemand.com/#docs/api/symbols/sap.m.Input.html"&gt;notes&lt;/A&gt; we are can use the submit event to trigger a function upon pressing Enter or Carriage Return (keycode 13). Not 100% sure about both keys as I suspect they have different values. I'm using the UI5 API version 1.38.4 so it should work as the 'submit' event was introduced in version 1.33.&lt;/P&gt;&lt;P&gt;Anyway, I have something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; &amp;lt;input id="something" values ="{rock&amp;gt;serialno}" submit="returnEntered"/&amp;gt; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;in my XML view code, and in my view controller I have something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;returnEntered: function() {
//Do something
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; However, when debugging, this function is not being called, or the submit event is NOT being actioned/triggered.&lt;/P&gt;&lt;P&gt;I know there are other ways of doing this using standard JavaScript, but, I would like this triggered from a specific Input field on the view, and ideally using the built-in UI5 options for view/control. &lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 15:10:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaq-p/485070</guid>
      <dc:creator>gary_king2</dc:creator>
      <dc:date>2017-03-28T15:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: UI5 Input and submit event</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485071#M85540</link>
      <description>&lt;P&gt;i hope you have entered some value before pressing enter button and make sure the controller is binded to the view.&lt;/P&gt;&lt;P&gt;Best REgards&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 16:32:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485071#M85540</guid>
      <dc:creator>maheshpalavalli</dc:creator>
      <dc:date>2017-03-28T16:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: UI5 Input and submit event</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485072#M85541</link>
      <description>&lt;P&gt;Yes, to the question of entering something into the field before hitting the [Enter] key, and, yes to binding, in that I have model bound to the table for &amp;lt;Input&amp;gt; and the input is using the format value="{alias&amp;gt;field}".&lt;/P&gt;&lt;P&gt;So yes, there is a binding from a model to the table within the controller, but the controller is not bound to the XML in the controller, but we do have an entry in the XML like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;controllerName="path.controller.controllerViewName"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hopefully that's what you mean by binding the controller to the view. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In theory though, it should still work for any &amp;lt;Input&amp;gt; without a binding to a model via the controller. But either way, it's not working.&lt;/P&gt;&lt;P&gt;As usual, there is very little out there on this subject, and no examples that I can find for using the submit event with &amp;lt;Input&amp;gt;, using XML. &lt;/P&gt;&lt;P&gt;[Appended later...] I have also  tried this code in my controller, but still it does not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;//Execute the onMySearch function when [Enter] is pressed, to save having to hit the button. 
this.getView().byId("searchRef").onsapenter = function() {
	onMySearch(); 
	};	
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Mar 2017 16:40:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485072#M85541</guid>
      <dc:creator>gary_king2</dc:creator>
      <dc:date>2017-03-28T16:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: UI5 Input and submit event</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485073#M85542</link>
      <description>&lt;P&gt;I think there might be some other issue, i suggest you to create another project and test it as i've use the submit event of input box  many times and it worked else you can go for the browser event of the control, which i wouldnt recomend.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Mahesh&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 05:38:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485073#M85542</guid>
      <dc:creator>maheshpalavalli</dc:creator>
      <dc:date>2017-03-30T05:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: UI5 Input and submit event</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485074#M85543</link>
      <description>&lt;P&gt;Resolved this issue. &lt;/P&gt;&lt;P&gt;I had a function like so in my view controller:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;returnEntered: function(oEvent){
	this.onMySearch(oEvent);
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; and in my view XML I simply had &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Input .... submit="returnEntered"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; But this is something that I originally had in my code, and refused to work. Eclipse can be a strange beast sometimes. &lt;/P&gt;&lt;P&gt;Anyway, all is now okay. Thanks to all those that responded. &lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 12:50:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485074#M85543</guid>
      <dc:creator>gary_king2</dc:creator>
      <dc:date>2017-03-30T12:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: UI5 Input and submit event</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485075#M85544</link>
      <description>&lt;P&gt;Please close this thread by using "correct answer" button &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 17:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-input-and-submit-event/qaa-p/485075#M85544</guid>
      <dc:creator>karthikarjun</dc:creator>
      <dc:date>2017-03-30T17:24:48Z</dc:date>
    </item>
  </channel>
</rss>

