减少包含超过500个事务的数据表页面的加载时间 [英] Decrease load time for data table page containing more than 500 transactions

查看:123
本文介绍了减少包含超过500个事务的数据表页面的加载时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 有没有办法通过使用数据表来减少IE中页面的加载时间。

  2. 如果我们使用服务器端分页和排序,我们还可以在服务器端进行快速搜索,还可以仅渲染特定的标签而不是整个页面。



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

    < / h:panelGroup>


侦听器被调用,但页面不被更新,以显示点击的下一页。

解决方案


有没有办法通过使用数据表来减少IE中页面的加载时间。


不。至少,不是没有用更健全的webbrowser替换IE。已知IE具有较差的HTML < table> renderer。这是客户端问题,而不是服务器(JSF)问题。您可以通过测量网络流量速度和浏览器HTML呈现速度来确认。







如果我们使用服务器端分页和排序,我们还可以在服务器端进行快速搜索,还可以仅渲染特定的标签而不是整个页面。


只需在服务器端执行搜索(由ajax)。



我建议您查看JSF组件库,而不是抓住松动的jQuery插件和拼凑松散的脚本。例如,PrimeFaces具有可轻松加载的< p:dataTable> ,可以使用干净的XHTML和JPA来解决所有问题。另请参阅懒惰< p:dataTable> 展示示例高效的JSF分页


  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.

解决方案

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.

这篇关于减少包含超过500个事务的数据表页面的加载时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆