I have 4 tabs in my jsf page. But when I click on the one of the tab, the response is very slow to get the actual page on that tab. Any idea on this part?
2 Answers
The best way to solve this is using partial update. One approach to partial update is to use p:remoteCommand. Here is a code sample to get you going.
<p:tabView widgetVar="tabPanel"
dynamic="false" cache="true"
actionListener="tabChange()">
<p:remoteCommand name="tabChange"
process="@this"
update="someOtherThingPerhaps"
actionListener="#{tabBean.onTabChange}" />
....
Maybe a sample of your tabs definition would be useful, version of primefaces + related jsf library, in my experience a slow response when the user clicks on a tab depends on the complexity of the datatable within each tab, when the user clicks a new tab, the request is sent to your backing bean onTabChange (ensure the code in that listener is not too expensive), and also the redraw time of the client computer will affect (if you have a data table with 100 columns having lots of stuff like tooltips, buttons, links, etc, it will be noticeable when the client computer is slow to draw the changes).