Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

h:panelGrid and colspan

 
Anthony Sykes
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17624
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also just use plain vanilla HTML.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17624
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic