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: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to