• 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

h:panelGrid + ui:repeat tag issue

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am trying to build columns in the h:panelGrid tag dynamically using facelets repeat tag (ui:repeat). My code looks like this:



The output it generated is



All the 4 elements (Emp. No,First Name,Middle Name,Last Name) of the "preferencesBean.columns" in single TD instead of creating 4 different TDs.

Is there any solution or work around available for this?

Thanks in advance.

Kalai.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having the same problem. Anyone else found a solution?



results in this



I don't understand why there is only one row. Each Panel group should be one column, and there should only be two columns. I suspect it has to do with the way JSF generates the HTML at separate time so when that at the time the table is created, the data is not present.
 
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
Did anyond found solution for this problem?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please try to use c:forEach to replace ui:repeat.

<c:forEach items="#{preferencesBean.columns}" var="item">
 
Saloon Keeper
Posts: 27708
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

Xiaonan Jiang wrote:Please try to use c:forEach to replace ui:repeat.

<c:forEach items="#{preferencesBean.columns}" var="item">



Please don't. Mixing JSTL and JSF is a bad idea.

I looked at doing something similar to this, but ended up using the RichFaces dataGrid control instead. It's actually designed for that kind of thing.
 
reply
    Bookmark Topic Watch Topic
  • New Topic