According to the notes 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.
Anyway, I have something like:
<input id="something" values ="{rock>serialno}" submit="returnEntered"/> in my XML view code, and in my view controller I have something like:
returnEntered: function() {
//Do something
}
However, when debugging, this function is not being called, or the submit event is NOT being actioned/triggered.
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.
Request clarification before answering.
Resolved this issue.
I had a function like so in my view controller:
returnEntered: function(oEvent){
this.onMySearch(oEvent);
}
and in my view XML I simply had
<Input .... submit="returnEntered"/>But this is something that I originally had in my code, and refused to work. Eclipse can be a strange beast sometimes.
Anyway, all is now okay. Thanks to all those that responded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.