MyFaces Core
  1. MyFaces Core
  2. MYFACES-942

Numeric item (that is blank) is force restored initial value after validation error of the other item.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.1.1
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None

      Description

      Numeric item (that is blank) is force restored initial value after validation error of the other item.

      Testcase:
      ----------
      package foo;
      public class NumTest {
      private String data = null;
      private Integer num = new Integer(100);
      private String str = "dummy";
      public String getData()

      { return data; }

      public void setData(String data)

      { this.data = data; }

      public Integer getNum()

      { return num; }

      public void setNum(Integer num)

      { this.num = num; }

      public String getStr()

      { return str; }

      public void setStr(String str)

      { this.str = str; }

      }
      ----------
      <%@ page contentType="text/html; charset=UTF-8" %>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
      <html><head><title>NumTest</title></head><body><f:view>
      <h:form>
      <h:inputText id="data" value="#

      {numTest.data}

      " required="true" />
      <h:inputText id="num" value="#

      {numTest.num}

      " />
      <h:inputText id="str" value="#

      {numTest.str}

      " />
      <t:messages showDetail="true" showSummary="true" />
      <h:commandButton action="dummy" value="Submit" />
      </h:form>
      </f:view></body></html>
      ----------

      First, display three text boxes.

      • blank - "100" - "dummy" -
        Clear all items, and click submit button.
        So, you can see validation error message for first item.
        And, you can see second item is "100" and third item is blank.

      I think that second item should be a blank.

      Maybe, it is a cause that IntegerConverter#getAsObject() return null, when value.trim().length() == 0 in "Process Validations" phase.

        Activity

        Thomas Andraschko made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12356667 ] MyFaces Workflow2 [ 12360553 ]
        sean schofield made changes -
        Workflow MyFaces Workflow2 [ 12355214 ]  MyFaces Workflow [ 12356667 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12353643 ] MyFaces Workflow2 [ 12355214 ]
        sean schofield made changes -
        Workflow MyFaces Workflow2 [ 12349118 ] MyFaces Workflow [ 12353643 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12347653 ] MyFaces Workflow2 [ 12349118 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12347653 ] MyFaces Workflow2 [ 12349040 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12347653 ] MyFaces Workflow2 [ 12348988 ]
        sean schofield made changes -
        Field Original Value New Value
        Workflow jira [ 12344758 ] MyFaces Workflow [ 12347653 ]
        yamo created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            yamo
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development