The following code loops thru a list from a database and builds a data table for each entry. Each entry has a List of columns that will be displayed in the data table. The problem I am having is that the value attribute of the p:columns, in the composite code, is not being changed when the composite is called a second time. It seems to cache the initial list of columns. Is there a way to reset the columns tag so that it uses the new columns list.
UPDATE It seems that the second data table is using the previous data tables row value name for the first row of the first cell. Everything else is fine. Here is a screen shot
2nd UPDATE I have also noticed that if you go to the second page of the second datatable and then back to the first page the broken cell, circled in the image, fixes it's self with the correct value.
3rd UPDATE In my code below I am using a ui:repeat tag. I have also used the primeface:accordian tag and they both produce the problem. I changed the ui:repeat tag with a c:forEach tag and that fixed the problem in the image below. The issue I still have is That I need this to be in a primefaces accordian tag so that I can dynamically build a tab for each data table. I thought my issues was in the p:columns tag of the data table, but it now seems to be in the ui:reat or p:accordian tags which both use the value="#{myBeanList}" attribute
<ui:repeat var="codetable" value="#{pc_Maintenence.codeMaintenenceTables}">
<util:maintenence_code pageBean="#{pc_Maintenence}" dataTableInfo="#{codetable}"
paginator="true" rows="10"/>
</ui:repeat>
This is the composite code that is called in the above code util:maintenence_code.
<composite:interface>
<composite:attribute name="pageBean" required="true" />
<composite:attribute name="dataTableInfo" required="true" />
<composite:attribute name="paginator" type="java.lang.Boolean" />
<composite:attribute name="rows" />
</composite:interface>
<composite:implementation>
<p:panel id="pnl_doc_code_table">
<p:dataTable value=#{cc.attrs.pageBean.getDataTableList(cc.attrs.dataTableInfo.tableListName)}"
var="tblVar" paginator="#{cc.attrs.paginator}"
rows="#{cc.attrs.rows}" dynamic="true" cache="false">
<p:columns var="column" styleClass="columns" id="columns" value="#{cc.attrs.dataTableInfo.columns}">
#{tblVar[column.name]}
</p:columns>
</p:dataTable>
</p:panel>
</composite:implementation>