Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8751

javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL not honored

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • No Release
    • 6.0.0.CR1
    • JSF
    • None

    Description

      Given a model like

      @javax.enterprise.inject.Model
      public class Model
      {
      private String data;

      public String getData()

      { return data; }

      public void setData(String data)

      { System.out.println("set data to " + data); this.data = data; }

      }

      and a view like

      <h:form>
      <h:inputText id="field" value="#

      {model.data}

      "/>
      <h:commandButton value="!"/>
      </h:form>

      an empty value is submitted even with

      <context-param>
      <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
      <param-value>true</param-value>
      </context-param>

      Debugging the application shows that the emptyStringIsNull of the component is true.

      even with a @FacesConverter(forClass=String.class) which is correctly run and doing a setSubmittedValue(null), the model still sees a "" instead of a null

      Tested to work correctly on a GF 3.0.1

      Attachments

        Issue Links

          Activity

            People

              ssilvert@redhat.com Stan Silvert
              nickarls Nicklas Karlsson (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: