
- Icefaces panelgroup update#
- Icefaces panelgroup manual#
Icefaces panelgroup update#
Changing the d ynamic property on the table tag to false explicitly had no effect and the behaviour was unchanged, so I will need to investigate client side tables further as for small data sets they are faster – I will update this post when I have done this.
Interestingly, I would have expected Primefaces to use a client side table by default, but clearly it was not. According to the Primefaces forum, for client side sorting, the sortBy property is not used as the displayed data is sorted. This showed that the sort was being attempted but was failing due to the invalid property, which indicates that the sort was attempted server side. The symptoms did not change, but an errors were logged in the Glassfish server log for each header click – “”. To diagnose the problem, I changed the value of the sortBy attribute in the column header to be an invalid bean property. I was not certain as to whether the table was client side or server side/Ajax, even though it should have been client side by default. Some dynamic CSS pseudo classes/jQuery trickery may be involved. I gave up this line of attack but may look into it later as to how it all works. It was not immediately obvious how the header click was handled – there was no obvious click event on the HTML element, and I could not see any Javascript running after a quick test with Firefox/Firebug. When the header was clicked, the up/down arrows were correctly displayed, but the data was not sorted – it was as if the request was ignored. The example fetched a list using JPA, stored the list in a view backing bean, then displayed it in a table with a sortable header. The lessons learned on this one are instructive so I summarise them below. Primefaces table sorting is pretty much transparent, requiring minimal effort and working out of the box.
Having successfully got sorting working I was frustrated to find that a new simple example failed to work. This behaviour exactly ties up with what I am seeing in my testing – the dynamic attribute does nothing, sortFunction is ignored, and all sorting is done via Ajax server side.
Icefaces panelgroup manual#
It is a shame that this was not documented better and more widely – the user manual still documents the dynamic attribute, and there are a number of posts about client side sorting (though in fairness they probably predate 2.2M1). Seemingly it was becoming too hard to support all the table features on both client and server sides. According to this post here by Cagatay Civici, the Primefaces Project Leader, as at Primefaces 2.2M1, client side datatable is not supported and the dynamic attribute is deprecated from then on.