This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Matrix display in JSF  RSS feed

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to show a matrix using JSF in the following way .

. A B C
X 1 2 3
Y 4 5 6
Z 7 8 9

I'm having a table in database named "matrix" which is having 3 fields.
field1 is a number,field2 and field 3 are foreign keys which references to
table "A1" and table "X1".
A1 is having elements A,B,and C
X1 is having elements X,Y and Z
Elements of table MATRIX are as follows
field2 field3 field1
A X 1
A Y 4
A Z 7
B X 2
B Y 5
B Z 8
.. .... ..

Now I need to display the field1 of "matrix" table according to X and Y direction values(Those values are dynamic ones).

As h:datatable only supports X direction display, I thought I'll use any available GRID component for this kind of display.Unfortunately I couldnt get any faces component for this.

Is there any ready-made component available? Or do I need to write my own component for this? If so, can you guys help me by providing any similar kind of component which I can change for my requirement?
I am using a combination of JSF-Spring-Hibernate.

Please help me out.

[ October 17, 2006: Message edited by: Koushik ]
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having same type of problems. Als working on a matrix that needs to have a dynamic range of colums and rows (gatehered from lists generated for rows and colums) where the headers are not given and the whole matrix is filled with checkboxes that are checked/unchecked according to a listof results that need to be compared at each row/column cross section with the according column and row values from their lists.

the jsf components that are given feel complicated to use. Having experience with struts components doesn't help me out in any way.

Right now I'm trying to generate the whole matrix serverside using HtmlPanelGrid in java. Maybe that's an outcome for you?
Posts: 8995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Koushik,

Hang in there and I'm sure you'll get some good advice here, but in the meantime, please update your display name to match our naming policy, we've found things stay friendlier tha way.


Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about just using the JSTL <c:forEach> tag to lay things out exactly how you need them? I'm new to JSF but this is what I've done in what little I've used JSF for thus far.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!