tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44928] New: Submitting empty text in inputText results in Integer with value '0' being set in backing bean (ELSupport)
Date Fri, 02 May 2008 20:58:41 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44928

           Summary: Submitting empty text in inputText results in Integer
                    with value '0' being set in backing bean (ELSupport)
           Product: Tomcat 6
           Version: 6.0.16
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: errorken@yahoo.com


I'm using tomcat 6.0.16 in combination with JSF RI 1.2_04.

I created a very simple page in which I have a form, one inputText and one
commandButton. The inputText value binds to a backing bean with the property
'test' of type java.lang.Integer.

So, when I click the submit button the numeric value I have entered in the
inputText gets set on the backing bean; all going fine.

However, when I submit an empty value (I leave the inputText empty) I see that
an Integer with value '0' is being set on the backing bean. This (logically)
results in a '0' being shown in my inputText after submitting the form (since
the property value of the backing has changed to '0').

It seems that the coerseNumber method of class "org.apache.el.lang.ELSupport"
is returning "ZERO" (which is a new Long(0L)) when the object passed to the
method is NULL. This cannot be right? Why would this implementation decide to
return a value when the supplied value was null? The same goes for Boolean.
When a NULL Boolean is given, it will return Boolean.FALSE...

I tested the same application (with the same libraries) on glfassfish and I had
no problems there...

So I'm wondering what is going wrong here on tomcat.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message