Skip to Content
0

Adding onblur event to multiple input boxes

May 10 at 06:40 PM

16

avatar image
Former Member

I have an input box that resides in each row of a table. I want to check the input of the box once the user moves off (blurs) the input box. I haven't been able to get an event listener to attach correctly and have tried multiple methods. Since the number of input boxes depends on the number of rows in the table I need to make sure it is attached to each input box. I'm using a Master-Detail layout for this and XML views.

<Input type="Number" class='quantityInput" width = "50px" value = "{path:'ItemModel>QuantityTaken',formatter:'com.uppr.util.Formatter.changeToInteger'}" maxLength="3"/>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Srikanth KV May 10 at 07:31 PM
0

use change event for the input box

"Is fired when the text in the input field has changed and the focus leaves the input field or the enter key is pressed."

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Dangit. I THOUGHT there should be something built in for this already. I see that the "change" event is just under sap.m.InputBase and not on the sap.m.Input Event list directly.

Thanks.

0

sap.m.Input inherits from sap.m.InputBase ..so all the methods and events of "sap.m.InputBase" can be used in "sap.m.Input"

0