getDisplayResultset() method interacts with databse using JDBC and call a procedures which returns diff cursor's depending upon the selection criteria(ticket type) passed as a parameter.
The ResultSet is iterated and depending upon the cursors out put and ticket type a respective object is formed which and then added into the displayList of populateDisplayListFromResultset() method and that displayList is passed as a value to dataTable
My issue is that i am having different types of Ticket Object depending on the ticket type having different attributes,so in my procedure diff select cursors output are returned depending on ticket type, so my TicketProcessingBean.displayList list will be holding different Ticket Objets depending on the Ticket Type.
So each time when i am dispalying dataTable , i want columns to be dynamic as per my current Ticket Object in displayList list.
In short i want columns of my dataTable to be dynamic for dispalying ticket details of different types.
If PrimeFaces is not an option, you can also do this in a backing bean. Just bind the table control to the bean and instantiate "HtmlColumn" objects, adding them as children to the HtmlDataTable object.
An IDE is no substitute for an Intelligent Developer.