JavaFX 8是否会实现文本字段验证支持? [英] Is JavaFX 8 going to implement text field validation support?

查看:98
本文介绍了JavaFX 8是否会实现文本字段验证支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JavaFX 2不提供验证支持(掩码,输入过滤等等)。采用不提供基本功能的技术是很困难的。我正在尝试实现自己的验证器,但这是一个很大的痛苦。

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.

JavaFX 8中是否有关于验证的消息?我试图找到新功能,但我不知道在哪里搜索,很难找到JavaFX 8中究竟会发生什么变化。我需要了解它,因为我正在考虑将JavaFX用于新的应用程序。

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.

推荐答案

回答

不, JavaFX 8不会实现高级验证支持。

No, JavaFX 8 will not implement high level validation support.

意见

我认为全面的验证支持不太可能在JavaFX核心库(这只是我个人的意见)。

I think it unlikely that comprehensive validation support will ever be in the JavaFX core libraries (this is just my personal opinion).

JavaFX提供了一个基础库,可以在其上实现其他库。 JavaFX 2.2提供了足够的支持,您可以在JavaFX之上编写验证库(人们已经这样做了)。

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).

有些原因导致您可能不需要验证支持JavaFX核心库:

There are some reasons why you might not want validation support in JavaFX core libraries:


  1. 由于JavaFX是Java SE和open-jfx项目的一部分,它必须遵循Java发布过程,由于各种原因,有时很慢。第三方项目没有这样的限制。

  2. JavaFX中的东西只实现了一种做事方式,而您可能希望在JavaFX上构建多个框架,每个框架用于不同目的,然后在最符合您需求的框架之间进行选择。

  3. 一些高级验证框架可能会使用诸如 Bean验证,它们目前只是Java EE规范的一部分。编写JavaFX只是为了使用Java SE,因此核心框架无法使用Java EE中的任何内容,即使这可能是验证所需要的。

  4. 通常,验证不是孤立完成的,而是通常是更广泛框架的一部分(例如表单填写框架或完整的应用程序平台)。

  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).

第三方验证库

执行验证的一些示例第三方库对于JavaFX字段是:

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

  • JideFX
  • FXForm2

我试图找到新功能,但我不知道在哪里搜索,很难找到JavaFX 8中的更改。

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.

我确信,当Java 8在几周内正式发布时,它将附带一个总结新JavaFX功能的声明。

I am sure, when Java 8 is officially released in a couple of weeks, it will come with an announcement summarizing new JavaFX features.

您可以通过过滤来了解JavaFX 8的所有新功能针对Java 8的固定功能的JavaFX问题跟踪器。以下是 JavaFX 8固定特征查询。请注意,链接查询仅报告较大的功能,而不是轻微的调整。

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.

这篇关于JavaFX 8是否会实现文本字段验证支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆