Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Data Table showing records in columns ?  RSS feed

 
Bernhard Knülle
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I'm new in JSF, so maybe this is a very simple problem:

My small application actually uses 'primefaces ' and I'd like to display the course of some laboratory values this way:

Parameter2014-08-022014-08-012014-07-31
Natrium [mmol/l]140.0135.0135.5
Calcium [mmol/l]2.12.02.3
Kalium [mmol/l]4.34.05.3
[...] [mmol/l]1.32.02.3


Data is stored in a per day manner, so each table column shows one record.

In JSF, I've only seen tables showing records in rows.

I would be glad, if someone could tell me how to display a transposed data table using a component framework in JSF.

Hueli





























 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a predefined fixed number of columns, you'd simply construct an appropriate DataModel object where the model row class is in the desired format.

If you need a variable number of columns, then you'll have to look at the PrimeFaces docs, because the core JSF tags don't support that, but I'm fairly sure that PrimeFaces extended data table tags do. I know that RichFaces does, since I've been there/done that.
 
Bernhard Knülle
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Tim.

as a JSF newbie, this is strong meat for me but I think, I'm on the right way now. I'm still struggling with CDI and finding the optimal bean modell.

I thought, that would be much easier ...
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!