I have a text field associated with an Integer variable, so when the user enters a number in this field, the binding mechanism automatically converts the text to Integer and sets this value to var. The problem is that since the user enters text into the text field, this binding mechanism only converts the values, and if the user enters several letters into it, the binding is not activated because there is no legal value in the text field. What I need in this situation, the binding should trigger a change with a null value, so I have null in my Integer var.
So, if the user left this field empty or something that is not a number, the binding will have to initiate the propagation of the null value; don't ignore the event ... How could I do this without scroll events in the text box?
Is java binding to change default behavior?
asabo
source
share