You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Arnaud Valère (JIRA)" <de...@myfaces.apache.org> on 2006/10/06 10:33:21 UTC
[jira] Commented: (MYFACES-942) Numeric item (that is blank) is
force restored initial value after validation error of the other item.
[ http://issues.apache.org/jira/browse/MYFACES-942?page=comments#action_12440365 ]
Arnaud Valère commented on MYFACES-942:
---------------------------------------
I have the same problem with version 1.1.3.
This is annoying for users, since no one attends that an erased value could reappear! As a result a user could save wrong data without noticing it!
> Numeric item (that is blank) is force restored initial value after validation error of the other item.
> ------------------------------------------------------------------------------------------------------
>
> Key: MYFACES-942
> URL: http://issues.apache.org/jira/browse/MYFACES-942
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 1.1.1
> Reporter: yamo
> Priority: Minor
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira