| Author |
Backing Bean having Map properties
|
vaithee sub
Greenhorn
Joined: Mar 12, 2004
Posts: 20
|
|
Hi, My Faces managed bean is Session scoped and the properties are as List & Map. I am using hx:dataTableEx to iterage over a property this is declared as follows List<Map<String, List<CareerDescrAtomicType>>> practiceAreaList; I am able to iterate over the property and display the value. But when I submit the form, it throws an Exception saying cannot test property property name in bean type null. There seems to be an issue setting properties of Map. Code snippet <hx:dataTableEx id="tableEx2" value="#{careerDisplayBean.practiceAreaList}" var="varpracticeArea" styleClass="dataTableEx" headerClass="dataTableHeaderClass" footerClass="footerClass" rowClasses="oddRowClass, evenRowClass" columnClasses="dataValueColumnClass,dataValueColumnClass" cellpadding="2" cellpadding="0" rules="all" border="0"> <hx:columnEx id="columnEx2a" width="60%"> <f:facet name="header"> <h utputText styleClass="outputText" value="Practice Area" id="header2a"></h utputText> </f:facet> <h utputText id="textSpecialty" value='#{practiceAreaList.paMapvarpracticeArea\"401\"http://0.practiceArea}' rendered="#{!sessionScope.isEditable}"> </h utputText> <h:panelGroup id="paIDPG"> <h:selectOneMenu id="pa" styleClass="selectOneMenu" value='#{varpracticeArea\"401\"[0].practiceArea}' rendered="#{sessionScope.isEditable}"> <f:selectItems value="#{practiceAreaList.paList}" /> </h:selectOneMenu> <h:message for="pa" errorClass="errorMessageStyleClass" fatalClass="errorMessageStyleClass"></h:message> </h:panelGroup> </hx:columnEx> <hx:columnEx id="columnEx2b" width="40%"> <f:facet name="header"> <h utputText styleClass="outputText" value="% of Your Time" id="header2b"></h utputText> </f:facet> <h utputText id="textPercentage" value='#{varpracticeArea\"401\"[0].estimatedAmount}' rendered="#{!sessionScope.isEditable}"> </h utputText> <h:panelGroup id="paValuePG"> <h:inputText id="estimatedAmount" value='#{varpracticeArea\"401\"[0].estimatedAmount}' rendered="#{sessionScope.isEditable}" styleClass="inputText"> </h:inputText> <h:message for="estimatedAmount" errorClass="errorMessageStyleClass" fatalClass="errorMessageStyleClass"></h:message> </h:panelGroup> </hx:columnEx> </hx:dataTableEx> To be precise, I get the following error when I submit the form javax.faces.el.PropertyNotFoundException: Error testing property 'practiceArea' in bean of type null at com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:343) at com.ibm.faces.databind.SelectItemsPropResolver.getType(SelectItemsPropResolver.java:107) at com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240) at com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208) at com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:292)
|
 |
Stephane Legendre
Greenhorn
Joined: Jun 04, 2008
Posts: 1
|
|
Hi, I've got the exact same problem. Did you receive any hint to solve it?
|
 |
 |
|
|
subject: Backing Bean having Map properties
|
|
|