• 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

Problem with a h:panelGrid and a ui:repeat

 
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am trying to use a h:panelgrid with a ui:repeat.
I would like for my h:panelgrid to show lines of three of the h:panelgroups that are inside the ui:repeat and end with the "hard coded" h:panelgroup. However, the h:panelgrid treats the ui:repeat as only one component. End result I have two components in my h:panelgrid!!
Can anyone please help?
Thanks,
Julien.

Here is the code:
 
Ranch Hand
Posts: 90
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Julien

You're right the panelGrid treats the ui:repeat like a one component, and do it for every component, the panelGrid is rendered as a table, maybe you can construct your table without the panel grid, I give you an example

I hope this can give you a clue how to solve your problem.
Regards
Cesar
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Cesar,
However you'll notice that I won't get exactly what I want to achieve: with the proposed solution, I get one item per row whereas I would like 3 items per row...
I just hoped there was some way of circumventing the problem you described still using a h:datagrid...
Thanks anyway for taking the time to answer
Julien.
 
Cesar Loachamin
Ranch Hand
Posts: 90
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Julien

I didn't understood your question very well, mmm It's difficult to resolve, but make it work, it's a weird solution but It works for me, try it.

Regards
Cesar
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll try that. Thanks Cesar.
 
Cesar Loachamin
Ranch Hand
Posts: 90
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Julien

I was thinking how to improve the code that I post, I find a perfect solution for this, this code enclose perfectly the <td> between the <tr>. Use this:

I think with this, it's properly corrected your problem.
Regards
Cesar
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, the first part is perfect. However you see there is a problem with the last "hardcoded" h:panelgroup ("and there").
I would like it to follow directly the last "dynamic" element. Do you see my point?
Regards,
Julien.
 
Cesar Loachamin
Ranch Hand
Posts: 90
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course Julien I understand you, I solve this, so use it:

So now, I hope this finally fix you problem.
Regards,
Cesar.
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Cesar.
 
reply
    Bookmark Topic Watch Topic
  • New Topic