This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with a h:panelGrid and a ui:repeat

 
Julien Martin
Ranch Hand
Posts: 384
  • 0
  • Mark post as helpful
  • send pies
  • 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:
 
Cesar Loachamin
Ranch Hand
Posts: 90
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll try that. Thanks Cesar.
 
Cesar Loachamin
Ranch Hand
Posts: 90
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Cesar.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic