[jsr-314-open] [426-BeanValidation] Default Enablement Change CLOSED

Ed Burns Ed.Burns at SUN.COM
Thu Mar 12 14:00:22 EDT 2009


Here's the final word on this:

Issue: 426 Bean Validation


SECTION: Modified Files
----------------------------
M      jsf-api/src/javax/faces/component/UIInput.java

- in validateValue(), modify spec for default enablement of bean
  validation to be the following.

     * <li><p>If the value is empty, but the system has been directed to
     * validate empty fields, validation should proceed.  The
     * implementation must obtain the init parameter <code>Map</code>
     * from the <code>ExternalContext</code> and inspect the value for
     * the key given by the value of the symbolic constant {@link
     * #VALIDATE_EMPTY_FIELDS_PARAM_NAME}.  If there is no value under
     * that key, use the same key and look in the application map from
     * the <code>ExternalContext</code>.  If the value is
     * <code>null</code> or equal to the string
     * &#8220;<code>auto</code>&#8221; (without the quotes) take
     * appropriate action to determine if Bean Validation is present in
     * the runtime environment.  If not, validation should not proceed.
     * If so, validation should proceed.  If the value is equal
     * (ignoring case) to &#8220;<code>true</code>&#8221; (without the
     * quotes) validation should proceed.  Otherwise, validation should
     * not proceed.</p></li>

 usingFacesInWebapps.fm

- document the VALIDATE_EMPTY_FIELDS context param like this:

  javax.faces.VALIDATE_EMPTY_FIELDS -- If this param is set, and calling
  toLowerCase().equals("true") on a String representation of its value
  returns true, all submitted fields will be validated. This is
  necessary to allow the model validator to decide whether null or empty
  values are allowable in the current application. If the value is
  false, null or empty values will not be passed to the validators. If
  the value is the string "auto", the runtime must check if JSR-303
  Beans Validation is present in the current environment. If so, the
  runtime must proceed as if the value "true" had been specified. If
  JSR-303 Beans Validation is not present in the current environment,
  the runtime most proceed as if the value "false" had been
  specified. If the param is not set, the system must behave as if the
  param was set with the value "auto".

-- 
| ed.burns at sun.com  | office: 408 884 9519 OR x31640
| homepage:         | http://ridingthecrest.com/




More information about the jsr-314-open-mirror mailing list