I'm opening this post because I searched the forum and found a case similar to mine, but there was no response. I already looked a lot in the forums but could not find a solution.
See another unanswered topic here viewtopic.php?f=3&t=43490
If I read columns from the table it works. But we have follow construct and than it dosn't work.
I have a table called TITLE with CONSTRAINT to a table PERSON. When we read the TITLE from the database (JPA) we get the object PERSON in the bean
In the ManagedBean I define the columns for the DataTable:
private String[] columnTitle= {"id", "value", "person.name"};
In the page I define the columns:
Code: Select all
<p:columns value="#{reportView.columns}" var="column" columnIndexVar="colIndex" sortBy="#{title[column.property]}"
filterBy="#{title[column.property]}" filterMatchMode="contains" style="width: #{column.size} !important" >
<f:facet name="header">
<h:outputText value="#{column.header}" />
</f:facet>
<h:outputText value="#{title[column.property]}" />
<f:facet name="footer">
<h:outputText value="#{column.header}" />
</f:facet>
</p:columns>
The class 'com.system.domain.Title' does not have the property 'person.name'.
But in the PERSON there is a property "name".
Can somebody tell me, how we can use properties from an object in an object?