• 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

JSF and Tables

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for the question but i'm completely new to jsf 2.0 and are trying to use a table with some speciality.

the table should look something like this



I'd like to iterate over a List of info Elements and fill the stuff into the table. All titel, info1, info2, info3, info4 are members of the class info. so i should be able to iterate over them.

If i do something like that


I can't get the table structure as described above.


So I tried to do it somehow like that:




But I can't get it working.

How do you implement a table like I want in jsf???

Thanks
 
Saloon Keeper
Posts: 27763
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
"I can't get it to work" doesn't tell us anything. What is it doing wrong?

Incidentally, you cannot just bind the collection to the dataTable tage, if that's what you're trying to do. You have to wrap the collection in a DataModel object and provide a getter for the datamodel object.
 
Lukas Stadler
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With icefaces I can use <ice:columnGroup> and <ice:column groupOn="#{...}"> to get it working. But icefaces 2.0 is still alpha and I'd lke to use JSF 2.0. My problem is, that I don't know how to use the dataTable element with the glassfish implementation (mojarra) to get exactly that grouping.

You can see the grouping with icefaces working in http://component-showcase.icefaces.org/component-showcase/showcase.iface under Table - grouping, so how do I do that with mojarra. I can't find the needed components to get it working
 
Tim Holloway
Saloon Keeper
Posts: 27763
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
Grouping isn't supported in core JSF dataTable. The core datatable is quite minimalist. For stuff like that, you'd need IceFaces or some similar extension like RichFaces (which also supports grouped tables).
 
reply
    Bookmark Topic Watch Topic
  • New Topic