• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Form layout

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys, I´m using a panelGrid with 2 columns for my forms...
it looks ok... Something like:



But There´s some fields that CAN stay on the same "row"... because they´re small fields..
Like:
"begin date" - "end date".

I m trying to put them on the same row inside the panelGrid, but isn´t looking pretty...
Something like...

This was my last try... and it isn´t the best! lol


Here´s some tries:

 
Saloon Keeper
Posts: 28654
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if this is what you're looking for, but the h:panelGroup element can be used to bundle up multiple items and have them all appear within the same cell.
 
Marco Noronha
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, but now its ugly..
and the form has much more code:



and still looks ugly:
 
Tim Holloway
Saloon Keeper
Posts: 28654
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can tidy up the layout some by using embedded panelGrids instead of panelGroup. Especially if you define columnClasses to control cell widths and thus keep things better aligned.
 
Marco Noronha
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:You can tidy up the layout some by using embedded panelGrids instead of panelGroup. Especially if you define columnClasses to control cell widths and thus keep things better aligned.



Ok, I´ll try that! thanks!
 
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is something we would do in our application with colspan. Is that an outmoded approach?
 
Tim Holloway
Saloon Keeper
Posts: 28654
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dennis Deems wrote:This is something we would do in our application with colspan. Is that an outmoded approach?



Outmoded? I don't know. But JSF doesn't do colspan. Never has. Some JSF extension tag libraries have colspan options, but the core JSF does not.
 
Marco Noronha
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:

Dennis Deems wrote:This is something we would do in our application with colspan. Is that an outmoded approach?



Outmoded? I don't know. But JSF doesn't do colspan. Never has. Some JSF extension tag libraries have colspan options, but the core JSF does not.



I ended up doing this:

panelGrid with 4 columns.

label
field
blankLabel
blankLablek

label
field
label2
field2


got it ?
But too pretty, but... its the less ugly I got!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic