• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

box layout using HtmlPanelGroup

 
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have requirement to display multiple panels/panelgrid on the screen. I have used HtmlPanelGroup to accomodate everything. It works but then panelgroup generates view symmetrically, while it has to display like a box layout(i.e. the between each panel should have any gaps, it should be displayed one by one without any gap). Any idea how to resolve this. I am attaching my code as follows:

 
Saloon Keeper
Posts: 27807
196
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
It's a little hard to follow that in code, but there are options available - I just need to explain them in tag terms, where I'm more comfortable.

The panelGrid tag renders as an HTML Table. Like its underlying HTML, there are attributes you can set for cell padding and spacing.

Panels themselves render as HTML divs, I think. At any rate, the style and styleClass attriibutes can be used in conjunction with the standard CSS margin and padding features.
 
Jignesh Patel
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:It's a little hard to follow that in code, but there are options available - I just need to explain them in tag terms, where I'm more comfortable.

The panelGrid tag renders as an HTML Table. Like its underlying HTML, there are attributes you can set for cell padding and spacing.

Panels themselves render as HTML divs, I think. At any rate, the style and styleClass attriibutes can be used in conjunction with the standard CSS margin and padding features.



Tim I have statred putting in xhtml page. This time I have tried to use datagrid(I am flexible on using either datagrid or panelgrid). The code is as follows:

As you can see I have to display subcategories for given category. I do have method called category.getSubCategories(), which returns set of subcategories.
But how to display them through use of datagrid and panelgrid.

So my problem is, I have collection of categories which in turn also contains collection of subcategories. And I have to display all together.

When I tried to display through code in my first post, it works but then I have all the grid of equal size, it takes up the max grid size irrespective of size of other grids and I don't want that.
 
Tim Holloway
Saloon Keeper
Posts: 27807
196
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
PanelGrid is designed for straight table displays (HTML table style). DataGrid is a PanelGrid-style display coupled with a data iterator.

In both cases, you should be able to control the overall size of the table display using the "style=" and "styleClass=" attributes on the grid tag. You can also define cell characteristics using the rowClasses and/or columnClasses attributes.
 
Jignesh Patel
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So are you saying by using stylesheet I can change the behaviour of table cell to display like a grids with different size?

Is there any other component in rich faces family which provides grid layout?
 
Jignesh Patel
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim,

I am trying to use projection as style sheet is not going to solve my problem. The code is as follows:


But I am getting error .
I do have jboss-el.jar in my lib folder then why this problem is coming. I am using tomcat 6 and seam2.1.2.
 
reply
    Bookmark Topic Watch Topic
  • New Topic