cancel
Showing results for 
Search instead for 
Did you mean: 

Adding onblur event to multiple input boxes

Former Member
0 Kudos
523

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"/>

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member365727
Active Contributor
0 Kudos

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."

Former Member
0 Kudos

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.

former_member365727
Active Contributor
0 Kudos

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"