Code: Select all
// 2DBean.java
List<Item> items[ ];
// some other code...
DataModel<List> my2DModel = new ArrayDataModel<List>(items) ;
//The rest if the code intializes the above objects, plus a List of <String> columnNames for my 2D datatable.
Code: Select all
<p:dataTable value="#{2DBean.my2DModel}" var="items" id="2DataTable">
<p:columns value="#{my2DModel.columnNames}"
var="column" columnIndexVar="colIndex">
<f:facet name="header">
<p:outputPanel>
#{column}
</p:outputPanel>
</f:facet>
[b]<h:selectOneMenu value="#{myInnerArrayList[colIndex].someProperty}" style="width:100%">
<f:selectItems value="#{2Dbean.itemsAvailableSelectOne}" />
</h:selectOneMenu> [/b]
</p:columns>
<f:facet name="footer">
<p:commandButton value="Apply">
<p:ajax event="click" process="2DataTable" listener="#{2Dbean.doSomething}"/>
</p:commandButton>
</f:facet>
</p:dataTable>
javax.el.PropertyNotFoundException: ... value="#{myInnerArrayList[colIndex].someProperty Target Unreachable, 'null' returned null
Does anyone have a clue on what am I possibly doing wrong?