Forums Register Login

h:panelGrid and colspan

+Pie Number of slices to send: Send
is it possible to set colspan using the h:panelGrid? As an example, say I wanted first two rows to be 2X2 and the last one 1X3.
+Pie Number of slices to send: Send
No, and it's a real pain. There are some third-party tags that support spanned columns, but not the core tags.

What I end up doing is multiple panelGrids. But then you need to use columnClasses (or equivalent) to keep them lined up properly, since otherwise the column widths will vary for each panelGrid.
+Pie Number of slices to send: Send
You can also just use plain vanilla HTML.
+Pie Number of slices to send: Send
The downside to embedding raw HTML in JSF is that JSF views are designed to be abstract. The JSF tags support alternative renderers so that, for example, if you want the same data to display on a desktop web browser, a cellphone web browser, WAP, and something exotic like Display PostScript, the same view definition serves all of them and the framework simply selects the renderer appropriate for the client.

HTML tags aren't that smart, so they'll get passed through as though they were ordinary text, which can be ugly (who wants to see raw HTML in their output?)
<p/>
and won't intelligently
arrange the output. based
on the target platform.

While core JSF doesn't support colspan, the Tomahawk panelGroup does, as does the RichFaces column tag. Just don't try and mix and match them. Although the docs don't say so, they expect to be working within the context of their respective table tags.
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 14662 times.
Similar Threads
How to display text & image in richfaces tab
How to totally collaspe an unused cell
radio button not working properly, list is sorted for every two clicks
displaying data in panelgrid
JSF rendering the whole page : Even the basic html tags
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:12:14.