I am trying to show a dataTable inside a tabView.
Currently my code in my xhtml looks as the following:
<p:tabView id="tabView" value="#{volumeController.shownSeries}" var="serie" cache="false">
<p:tab title="#{serie.name}">
<p:dataTable value="#{volumeController.findVolumesForSeries(serie.id)}" var="volume">
<p:column>
<h:outputText value="#{volume.volumeNumber}"/>
</p:column>
</p:dataTable>
</p:tab>
</p:tabView>
So, now my problem is, that I get the following error:
javax.el.PropertyNotFoundException: /Volume/list.xhtml @22,89 value="#{volume.volumeNumber}": The class 'at.kirin.entity.Series' does not have the property 'volumeNumber'.
The problem is, that this is my method in my volumeController:
public List<Volume> findVolumesForSeries(long id) {
List<Volume> v = volumeFacade.getVolumesForSeries(id);
return v;
}
So I return a list of volumes in my controller, but Glassfish interprets it as an list of series. I tried to show the values with the .toString() but it only shows the results of the .toString() of my series.
My Volume-Entity has a field "VolumeNumber" and the method in the controller gets called for every tab.
Where did I go wrong or is it a bug in primefaces? (I am using 4.0)
Greetings Kirin