Using JPADataModel
How can I sort and filter a nested entity property? What changesd do I have to make to the example to sort and filter by the name of
the engine in the following snippet?
<rich:column sortBy="#{job.engine.name}" filterBy="#{job.engine.name}">
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{job.engine.name}" />
</rich:column>
@Entity
public class Job implements Serializable {
@Id @GeneratedValue
private Long id;
private Engine engine;
...
}
@Entity
public class Engine implements Serializable {
@Id @GeneratedValue
private Long id;
private String name;
...
}