Firstly I would provide my configuration details:
JSF - 1.2
Icefaces - 1.8
Servlet - 2.5
I am trying to put an ice:selectBooleanCheckbox
in a datatable. But, I am facing an expception repeatedly:
icelogin.jspx @54,59 value="#{o.checkBox}": ELResolver cannot handle a null base Object with identifier 'o'
Here is my jspx code
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ft="http://facestrace.sourceforge.net">
<f:view>
<head>
<title>JSF Jump start</title>
</head>
<body>
<ice:form>
<h3>User Name and Password</h3>
<table>
<tr>
<td>
<ice:outputLabel value="Name"/>
</td>
<td>
<ice:inputText value="#{userLogin.name}"/>
</td>
</tr>
<tr>
<td>
<ice:outputLabel value="Password"/>
</td>
<td>
<ice:inputText value="#{userLogin.password}"/>
</td>
</tr>
</table>
<ice:dataTable value="#{userLogin.orderList}" var="o">
<ice:column>
<!-- column header -->
<f:facet name="header">Order No</f:facet>
<!-- row record -->
#{o.orderNo}
</ice:column>
<ice:column>
<f:facet name="header">Product Name</f:facet>
#{o.productName}
</ice:column>
<ice:column>
<f:facet name="header">Price</f:facet>
#{o.price}
</ice:column>
<ice:column>
<!-- column header -->
<f:facet name="header">Checkbox</f:facet>
<!-- row record -->
<ice:selectBooleanCheckbox value="#{o.checkBox}"/>
<!-- #{o.checkBox} -->
</ice:column>
<ice:column>
<f:facet name="header">Quantity</f:facet>
#{o.qty}
</ice:column>
</ice:dataTable>
<ice:commandButton type="submit" value="Sign In" action="#userLogin.saveData}"/>
</ice:form>
</body>
</f:view>
</html>
If I remove checkBox value from #{o.checkBox} to true or false, it works. I presume that for true, the checkBox should be selected in UI, and false it must remain unselected. But, even if I put code like this
<ice:selectBooleanCheckbox value="true"/>
check button is being displayed in UI but is not showing up selected though the value is true. I am following this tutorial, in my case I have one more extra parameter in my bean.
boolean checkBox;
I have getters and setters in place, and passed to the constructor, all set. What could be wrong?