0

I need to add some validation to my JavaFX8 application. In order to effectively do this I would need to hook somewhere in the various Controls before content is actually changed and conditionally inhibiting the change (and doing some error reporting, of course).

The normal way (attaching a ChangeListener to the relevant Property) actually arrives far too late and, if validation fails, I need to undo last change, which is messy, error prone and spawns more (unwanted) ChangeEvents.

Is there some way of getting notification "about to change"?

Alternatively: what is the "Best Practice" for Validation?

I did some research, but it doesn't seem there's anything available, even jidefx defines, but does not implement REVERT FailBehavior,

ZioByte
  • 2,690
  • 1
  • 32
  • 68

0 Answers0