Is JavaFX 8 going to implement text field validation support?

前端 未结 1 1405
别跟我提以往
别跟我提以往 2020-12-30 06:37

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 try

相关标签:
1条回答
  • 2020-12-30 07:06

    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:

    1. As JavaFX is part of Java SE and the open-jfx project, it must follow the Java release process, which can be quite slow at times for various reasons. 3rd party projects don't have such restrictions.
    2. Things in JavaFX implement just one way of doing things generally, whereas you might wish to have multiple frameworks built on JavaFX, each for different purposes, then choose between the framework which best meets your needs.
    3. Some advanced validation frameworks might make use of things such as Beans Validation, which are currently only part of the Java EE specification. JavaFX is written to work with just Java SE, so the core framework can't make use of anything from Java EE, even though that might be desirable for validation.
    4. Generally, validation is not something done in isolation, but is often part of a wider framework (such as a form filling framework or a complete application platform).

    3rd Party Validation Libraries

    Some sample 3rd party libraries which perform validation for JavaFX fields are:

    • JideFX
    • FXForm2

    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.

    0 讨论(0)
提交回复
热议问题