Why is my large JSF data table is not populating only in IE?

别等时光非礼了梦想. 提交于 2019-12-02 14:10:19

问题


I am trying to generate a table dynamically using HtmlDataTable in JSF. When I am giving the number of rows and columns greater than 25 each, some of the cells are not getting populated only in IE and it's getting very slow. However, I can see the value when debugging the code using Firebug. It is working fine in Firefox and Chrome.

How is this caused and how can I solve it?


回答1:


Internet Explorer is known to have an extremely poor table renderer. Especially when the columns and table nesting goes overzealous.

There's no other solution than making your table smaller by introducing lazy loading and pagination so that only 10~100 rows will be displayed at once. Add if necessary search filters. Additional benefit is that it's also much more user friendly. Google for example also doesn't show all the zillion website links in a monster table without filtering and pagination.

If you happen to use PrimeFaces, use <p:dataTable> with LazyDataModel.

See also:

  • Efficient JSF Pagination

Update as per the comments, there is not really other alternative if you can't change your server side code. Your best bet is probably to inform the enduser that s/he should be using a real browser instead.

E.g.

<script>
    var ie = /*@cc_on!@*/false;

    if (ie) {
        window.location = 'some_page_which_recommends_different_browser.xhtml';
    }
</script>


来源:https://stackoverflow.com/questions/9723621/why-is-my-large-jsf-data-table-is-not-populating-only-in-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!