JSF ui:repeat vs h:dataTable

孤街醉人 提交于 2019-11-30 21:53:43

is there any use cases where the only choice is to use h:dataTable?

  • If you want to use an UIData-based component (with all of its special attributes absent in UIRepeat).
  • If you want to render a HTML <table> by a JSF component.
  • If you want to be able to customize the <table> rendering (like PrimeFaces <p:dataTable> does with sorting, filtering, grouping, folding, lazyloading, etc, etc).
  • If you aren't using Facelets as view technology.

or the opposite (only choice is ui:repeat)?

  • If you don't want any of above and thus need a pure markup-less iteration component.
  • If you want to be able to skip every n items during iteration (using step attribute).
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!