javaserverfaces-spec-public
  1. javaserverfaces-spec-public
  2. JAVASERVERFACES_SPEC_PUBLIC-671

behavior issues with "INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL" setting

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.3
    • Component/s: Validation/Conversion
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      671
    • Status Whiteboard:
      Hide

      cat1 frame size_small importance_medium

      Show
      cat1 frame size_small importance_medium

      Description

      This impl bug was filed:
      https://java.net/jira/browse/JAVASERVERFACES-1375

      as there are some issues in handling empty string validation...

      Now, the fix is in; and most-likely the behavior of the alogrithm needs to be
      updated in the spec as well. Additionally there should be java doc which
      explains the change...

        Activity

        Hide
        Ed Burns added a comment -

        Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

        Show
        Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.
        Hide
        Manfred Riem added a comment -

        Setting priority to Major

        Show
        Manfred Riem added a comment - Setting priority to Major
        Hide
        Ed Burns added a comment -
        <os890> well what worked in the past is:
        <os890> public class FixedHtmlInputText extends HtmlInputText {
        <os890>     @Override
        <os890>     public void validate(FacesContext context) {
        <os890>         Object submittedValue = getSubmittedValue();
        <os890>         try {
        <os890>             super.validate(context);
        <os890>         } finally {
        <os890>             if (!isValid()) {
        <os890>                 setSubmittedValue(submittedValue);
        <os890>             }
        <os890>         }
        <os890>     }
        <os890> }
        
        Show
        Ed Burns added a comment - <os890> well what worked in the past is: <os890> public class FixedHtmlInputText extends HtmlInputText { <os890> @Override <os890> public void validate(FacesContext context) { <os890> Object submittedValue = getSubmittedValue(); <os890> try { <os890> super .validate(context); <os890> } finally { <os890> if (!isValid()) { <os890> setSubmittedValue(submittedValue); <os890> } <os890> } <os890> } <os890> }
        Hide
        balusc added a comment -
        Show
        balusc added a comment - Related: https://java.net/jira/browse/JAVASERVERFACES-2262
        Hide
        balusc added a comment -

        EditableValueHolder#getSubmittedValue() javadoc already says

        The action taken based on whether the value is null, empty, or
        non-null is determined based on the value of the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL context-param.

        The UIInput implementation never considered that. I have therefore applied the fix as proposed in https://java.net/jira/browse/JAVASERVERFACES-2262?focusedCommentId=340126#comment-340126 without any necessary spec changes.

        https://java.net/projects/mojarra/sources/git/revision/0813ee1fdef418e47ef03ced7d57a1abe4c2bf54

        Show
        balusc added a comment - EditableValueHolder#getSubmittedValue() javadoc already says The action taken based on whether the value is null , empty, or non- null is determined based on the value of the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL context-param. The UIInput implementation never considered that. I have therefore applied the fix as proposed in https://java.net/jira/browse/JAVASERVERFACES-2262?focusedCommentId=340126#comment-340126 without any necessary spec changes. https://java.net/projects/mojarra/sources/git/revision/0813ee1fdef418e47ef03ced7d57a1abe4c2bf54

          People

          • Assignee:
            balusc
            Reporter:
            mwessendorf
          • Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: