I have a JSF+Primefaces 3.2 application.
I am using p:rowExpansion within a p:dataTable.
In some cases it works great but for some records it doesn’t show any records.
<p:dataTable id="accountTable" value="#{accountBean.accountList}" var="account"
rows ="10" paginator="true" paginatorPosition="bottom" widgetVar="accountTable">
<f:facet name="header">
</f:facet>
<p:column>
<p:rowToggler />
</p:column>
<p:column>
<h:outputText value="#{account.shortName}" />
</p:column>
<p:column headerText="#{msj.account_accountNumber}">
<h:outputText value="#{account.number}" />
</p:column>
<p:rowExpansion>
<h:panelGrid columns="2">
<f:facet name="header">
<h:outputText value="#{msj.detail} #{account.shortName} - #{account.number}" />
</f:facet>
<h:outputLabel value="#{msj.account_shortName}:" />
<h:outputText value="#{account.shortName}" />
<h:outputLabel value="#{msj.account_accountNumber}:"/>
<h:outputText value="#{account.number}"/>
<h:outputLabel value="#{msj.account_currency}:"/>
<h:outputText value="#{account.currency.code} - #{account.currency.description}"/>
</h:panelGrid>
</p:rowExpansion>
</p:dataTable>
It is wierd, because the same value that is shown in the datatable (account.shortName) is not shown in the expansion area.
I have another datatable (just like this) in the same page. Debugging with firebug I realize that it is refreshing the other datatable, and sending the request as if I were pressing the Row expandion of the other datatable.
Any help?
Thanks!
The problem was that I used the same widgetVar name across the tables.