Dynamic DataTables in ICEfaces
ICEfaces is the best AJAX framework I have come across. Not the most powerful — I have done some rather tricky animated vector-graphics stuff with Dojo together with custom Javascript (both browser and server-side) that would be impossible to emulate with any other AJAX tool that I know of. But the cool thing with ICEfaces is that it provides a rich and highly interactive and scalable AJAX-driven and CSS-styled user interface out of the box, using only a server-side JSF interface. Your hands won't ever have to touch a single line of Javascript code, it's all encapsulated in JSF components. This is extremely good news for productivity, assuming you already have taken the trouble to learn some JSF.
However, ICEfaces is not free from quirks. For example, when creating a
However, ICEfaces is not free from quirks. For example, when creating a
DataTable
dynamically from Java code, it is essential that UIColumn.setId()
is called for each dynamically created UIColumn
, otherwise incremental updates to the DataTable
model will be rendered incorrectly. This is not at all obvious since everything works without any "id
" attributes when the UIColumns
are created via static XML code.
Re: Dynamic DataTables in ICEfaces
It took me a day's work to figure this out (ICEfaces 1.8.2) - I wish I had come across your info in the first place. The behavior is unexpected indeed: the explicit column id won't be used anywhere in the rendered HTML (for a simple table, at least), the UIColumn's child objects will be provided with an automatically generated id by the framework just fine - but still, omitting to explicitly call setId() on the UIColumn will effectively break the UISeries' saveChild/restoreChild mechanism. Thank you.