【问题标题】:Retrieve a Validator from FacesContext从 FacesContext 中检索验证器
【发布时间】:2013-08-22 03:13:42
【问题描述】:

我想知道是否可以从FacesContext 检索Validator,因为我可以从那里检索ID。通过这样做:

Iterator<String> ids = FacesContext.getCurrentInstance()
                .getApplication().getValidatorIds();

我现在想通过使用这些 ID 获得 Validator。这可能吗?

【问题讨论】:

    标签: jsf validation facescontext


    【解决方案1】:

    是的:

    FacesContext.getCurrentInstance().getApplication().createValidator(java.lang.String validatorId);
    

    javadoc

    【讨论】:

      猜你喜欢
      • 2012-06-16
      • 2012-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-21
      • 1970-01-01
      • 1970-01-01
      • 2013-11-05
      相关资源
      最近更新 更多