• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Advice on use of h:panelgrid vs. html tables

 
ed connell
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I were just using JSF, and not a nice component library like RichFaces, there's obviously quite a lack of control with the panelgrid component.

I believe I saw mention on this forum somewhere, think it was Tim H, to just use html tables to gain control of the formatting.

I just started to experiment, and it seems to be what I should've done from the start, rather than try and shoe horn everything into panelgroups and panelgrids.

So, would this be considered common place to just use the html markup, peppered with JSF tags? Any pitfalls I'm likely to run into before I go too far down this road?

Thanks
 
Rainer Eschen
author
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We had the same problem using early releases of ICEfaces some years ago. It was a good idea to use pure HTML tables those days.

Meanwhile I tried a cleaner implementation with my ICEfaces book code. Today I would suggest to use panelGrid and panelGroup. This will help for maintenance. Our "old code" is full of HTML table tags and a bit too unclear. You already notice smells even after about 1-2 years.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I've changed my mind in recent times, myself. Although the lack of rowspan and colspan in the core datagrid components is a royal nuisance, overall I've found that the page is cleaner using pure JSF instead of HTML. Plus, of course, removing raw HTML gives more options for alternative rendering systems.

I just got done removing one of my last HTML holdouts just the other day.
 
ed connell
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many thanks to you both - I'll discard that line of thinking then and plow ahead with styling up my panelgroups and grids.

I must admit-my little experiement at resorting back to html markup was making the code look just downright ugly.

Ed.
 
suresh dasari
Ranch Hand
Posts: 121
Chrome Eclipse IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree that panelgrids doesnt support colspan, but you can extend the existing panelgrid and create a custom one with colspan and use instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic