I implemented the <p:rowExpansion> from PF in my HTML, as seen below.
<p:column style="width:16px">
<p:rowToggler />
</p:column>
<p:column headerText="Content 1" sortBy="#{portview.port_comment}">
<h:outputText value="#{contentbean.content1}" />
</p:column>
<p:rowExpansion>
<p:panelGrid columns="2" columnClasses="label,value" style="width:50%">
<h:outputText value="Label:" />
<h:outputText value="#{portview.port_comment}" />
</p:panelGrid>
</p:rowExpansion>
Yet, the data shown in the expansion does not fit the row it was issued from and in the PF website I can't find any clues on how to solve this.
Q: What should I do here?
UPDATE:
I use version 8.0 of Primefaces. The outcome looks like this...
The data in the expansion shows just any value from the view.
Here's my bean behind the html...
@Named(value = "vb")
@ViewScoped
public class ViewBean implements Serializable {
@Inject
private ViewHandler vh;
@PostConstruct
public void init() {
}
public List<PortView> getPVList() {
return vh.getPortViewList();
}
And the ViewHandler
looks like this...
@Stateless
public class ViewHandler {
public List<PortView> getPortViewList() {
List<PortView> pvlist = em.createQuery("SELECT v FROM PortView v", PortView.class).getResultList();
return pvlist;
}