I am createing a datatable programmatically in the backing bean when a command button is clicked and bound it in xhtml as below.
Code: Select all
<p:dataTable binding="#{ruleTableDataBean.dynamicDataTable}" id="dynamicTable"/>
<p:commandButton value="Create Rule Table" update="dynamicTable" id="updateTableButton" actionListener="#{ruleTableDataBean.createRuleTable}"onclick="submitform()"/>
But on the screen it shows empty table. I have to manually click refresh button on the browser to display rows.
Since this table has dynamic number of columns, when I add/remove any columns in backing bean, it does not update those columns on the screen, I have to manually refresh the screen again.
But if I add/delete any rows in backing bean, it updates the table without manual refresh.
If I add/remove any columns followed by add/delete rows, button click updates both rows and columns properly without manual refresh.
I am using Prime Faces 3.0.1 with Web Sphere 8.0.
Does any one experienced similar issue ?
Thanks & Regards,
Ravi