| Author |
JSF and Tables
|
Lukas Stadler
Greenhorn
Joined: Aug 06, 2008
Posts: 2
|
|
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
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 11740
|
|
"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.
|
A lot the of modern-day software development platforms are designed to permit parcelling out work to those with the best aptitude for it. A lot of modern-day business is predicated on making one person do all the work, regardless of aptitude.
|
 |
Lukas Stadler
Greenhorn
Joined: Aug 06, 2008
Posts: 2
|
|
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
Joined: Jun 25, 2001
Posts: 11740
|
|
|
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).
|
 |
 |
|
|
subject: JSF and Tables
|
|
|