user679526 user679526 - 6 months ago 33
jQuery Question

Decrease load time for data table page containing more than 500 transactions


  1. Is there a way to decrease the load time of the page in IE just by using Data tables.

  2. If we use server side pagination and sorting, can we also do a quick search on server side and also render only that particular tab instead of the whole page.

    <h:panelGroup id="transactionsPanel">
    <h:dataTable>
    </h:dataTable>
    <ui:repeat value="#{backing.pages}" var="page" varStatus="current">
    <h:commandLink value="#{page}" actionListener="#{backing.page}"
    rendered="#{page != backing.currentPage}" >
    <f:ajax render="transactionsPanel"/>
    </h:commandLink>
    <ui:repeat>

    </h:panelGroup>



The listener is called but the page is not updated to display the next page clicked.

Answer

Is there a way to decrease the load time of the page in IE just by using Data tables.

No.

At least, not without replacing IE by a more sane webbrowser. IE is known to have a poor HTML <table> renderer. This is a client problem, not a server (JSF) problem. You can confirm this by measuring the network traffic speed and browser HTML rendering speed.


If we use server side pagination and sorting, can we also do a quick search on server side and also render only that particular tab instead of the whole page.

Just perform the search (by ajax) in server side as well.

I recommend to look at JSF component libraries instead of grabbing to loose jQuery plugins and cobbling loose scripts together. PrimeFaces for example has a lazily loadable <p:dataTable> which solves all your problems with just clean XHTML and JPA. See also the lazy <p:dataTable> showcase example and Efficient JSF Pagination.

Comments