well, not that much horrible..
Actually I am stuck with a problem in doing true pagination. Here is the code
The backing bean
The class that extends DataModel for pagination
the jsf page
Now here when the first time page is loaded, everything is ok. When I hit '2' to show the second page, the method "getTableModel" in 'Paginator' backing bean is called three times. first in "APPLY_REQUEST_VALUES" phase and then two time is in "RENDER_RESPONSE" phase. In real situation where data base will be involved it means three database hits which is surly not a good thing. First I dont want database hit in "APPLY_REQUEST_VALUES" phase as it will again query db. If I get to know that this method is being called in "APPLY_REQUEST_VALUES" phase then I can restrict it.and Secondly, I have no Idea that why is the "getTableModel" method called twice in "RENDER_RESPONSE" phase.
Thanks in advance