gbfragoso / MaskedTextField

MaskedTextField is an component similar to JFormmatedText field and can be used in same way.
MIT License
22 stars 4 forks source link

Update MaskedTextField.java #1

Closed nerd-king closed 5 years ago

nerd-king commented 5 years ago

Added a listener to accomodate field binding to the plain text.

nerd-king commented 5 years ago

When using bindBidirectional from a DAO to the field, if you do it on the normal text parameter, you get the unformatted text in the control, where if you bind on the plaintext it will update correctly as long as this listener is there. For some reason when binding straight to the text property it's not being formatted, plus I want to store the plain text not the formatted text, hence why I bind to that value instead.