如何在JSF panelGrid中设置colspan和rowspan? [英] How to set colspan and rowspan in JSF panelGrid?

查看:284
本文介绍了如何在JSF panelGrid中设置colspan和rowspan?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在JSF < h:panelGrid>中设置 colspan rowspan

How can I set colspan and rowspan in JSF <h:panelGrid>?

推荐答案

标准JSF实现都不可能。有3种方法可以解决这个问题:

None of both is possible with the standard JSF implementation. There are 3 ways to fix this:


  1. 自己编写纯HTML。 < h:panelGrid> 基本上呈现HTML < table> 。这样做。

  2. 创建一个支持此功能的自定义HTML渲染器。然而,它会带来很多汗水和痛苦。

  3. 使用支持此功能的第三方组件库。

  1. Write plain HTML yourself. A <h:panelGrid> basically renders a HTML <table>. Do the same.
  2. Create a custom HTML renderer which supports this. It'll however be a lot of sweat and pain.
  3. Use a 3rd party component library which supports this.
    • Tomahawk has a <t:panelGroup> component which supports colspan in <h:panelGrid>.
    • RichFaces (3.x only) has a <rich:column> component which supports both colspan and rowspan in <rich:dataTable>.
    • PrimeFaces has a <p:row> next to <p:column> which is supported in both <p:panelGrid> and <p:dataTable> (also with <p:columnGroup>).

这篇关于如何在JSF panelGrid中设置colspan和rowspan?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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