You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/11/07 11:42:10 UTC
DO NOT REPLY [Bug 46164] New: Jasper Error (Boolean null is
converted to false)
https://issues.apache.org/bugzilla/show_bug.cgi?id=46164
Summary: Jasper Error (Boolean null is converted to false)
Product: Tomcat 6
Version: 6.0.18
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: blocker
Priority: P2
Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: pieter.pareit@easypay.be
Created an attachment (id=22838)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22838)
error description
Error in Jasper for tomcat-6.0.18
Test environment:
Using: tomcat 6.0.18
Using: JSF 2.0 (error can be simulated with JSF)
------------------------------------------------------- JSF Managedbean
public class TestHandler {
private Boolean active = null;
public Boolean getActive(){
return active;
}
Public void setActive(Boolean active){
System.out.println(“My value is: “+ active);
this.active = active;
}
}
------------------------------------------------------- JSF Custom Component
<e:yesNo value="#{testHandler.active}" id=”active”/>
------------------------------------------------------- RENDERED HTML
<select name="f:active" id="f:active">
<option value="" selected="selected"></option>
<option value="YES">Ja</option>
<option value="NO">Nee</option>
</select>
----------------------------------- yesNo COMPONENT RENDERER
public void decode(FacesContext context, UIComponent component) {
UIInput input = (UIInput) component;
input.setValue(null); //just as a test case!!! Explicit set the null value!!!!
}
!!!!!!!!!!!!!!!!!!!!!!!!!!!! RESULT !!!!!!!!!!!!!!!!!!!!!!
Expected result:
- property active of the testhandler must be null
- [console output] My value is: null
Actual result:
- property active is false
- [console output] My value is: false
!!!!!!!!!!!!!!!!!!!!!!!!!! WORK AROUND !!!!!!!!!!!!!!!!!!!!
I copied the following jar files from tomcat-6.0.13 to tomcat-6.0.18 and it
works
el-api.jar
jasper.jar
jasper-el.jar
jasper-jdt.jar
!!!!! Looks like tomcat-6.0.18 converts a Boolean null value to false !!!!!!
--
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
DO NOT REPLY [Bug 46164] Jasper Error (Boolean null is converted to
false)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46164
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Mark Thomas <ma...@apache.org> 2008-11-08 17:26:57 PST ---
This behaviour is as per the spec. See the JSP-EL spec, section 1.18.5
The following option may disable this behaviour but I haven't tested it:
org.apache.el.parser.COERCE_TO_ZERO=false
Please use the users list if you require further assistance.
--
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