JavaFX 2 does not provide validation support (masks, input filtering and so on...). It is difficult to adopt a technology that does not offer basic functionalities. I am trying to implement my own validators, but that is a big pain.
Are there any news in JavaFX 8 about validation? I was trying to find new features, but I don't know where to search, it is difficult to find exactly what will be the changes in JavaFX 8. I need to know about it, because I was considering JavaFX for a new application.
To create a text field, you need to instantiate the TextField class, to the constructor of this class you can also pass a string value which will be the initial text of the text field.
TextField class is a part of JavaFX package. It is a component that allows the user to enter a line of unformatted text, it does not allow multi-line input it only allows the user to enter a single line of text. The text can then be used as per requirement.
ValidatorFX is a validation library for JavaFX. It is inspired by ControlsFX but tries to overcome its shortcomings: Validations based on arbitrary observable values (not just the value of a control) Validations can decorate an arbitrary number of nodes (not just the one control)
Answer
No, JavaFX 8 will not implement high level validation support.
Opinion
I think it unlikely that comprehensive validation support will ever be in the JavaFX core libraries (this is just my personal opinion).
JavaFX provides a base library upon which other libraries can be implemented. JavaFX 2.2 provides enough support that you could write validation libraries on top of JavaFX (and people have done so).
There are some reasons why you might not want validation support in JavaFX core libraries:
3rd Party Validation Libraries
Some sample 3rd party libraries which perform validation for JavaFX fields are:
I was trying to find new features, but I don't know where to search, it is difficult to find exactly what will be the changes in JavaFX 8.
I am sure, when Java 8 is officially released in a couple of weeks, it will come with an announcement summarizing new JavaFX features.
You can find out what all of the new features for JavaFX 8 are by filtering the JavaFX issue tracker on fixed features for Java 8. Here is a link to the result of a JavaFX 8 fixed feature query. Note, the linked query reports only larger features, not minor tweaks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With