tags:

views:

147

answers:

2

how to give colspan and rowspan in JSF panelgrid?

A: 

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

  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.
BalusC
Have you tried the rich:column in a panelgrid with colspan? Because the doc says: "The "colspan", "rowspan", and "breakbefore" attributes only affect columns in a <rich:dataTable>, not those in a <rich:extendedDataTable>."
volothamp
A: 

I agree with BalusC's answer and want to add, that the Primefaces JSF2 component library also offers this functionality if you use its p:dataTable component. It is called grouping there.

alfonx