This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes How can we represent a matrix like structure in jsf. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How can we represent a matrix like structure in jsf." Watch "How can we represent a matrix like structure in jsf." New topic
Author

How can we represent a matrix like structure in jsf.

chetan padhye
Greenhorn

Joined: Apr 17, 2008
Posts: 15
Hi ,

How can we represent a matrix like structure in jsf.

It will have x number of rows and y number of columns. Both x and y are dynamic.

so it should be some thing like below .

-------------A B C D . . .

X------------ o o o o . . .

Y------------ o o o o . . .

Z------------ o o o o . . .

.------------ . . . . . . .

.------------ . . . . . . .



1) Using data table we can have columns oriented structure , i mean we can have iterate over any number of rows rendering respective data

but in this case we do not have number of column fixed rather they are dynamic .

Is there any possible solution in jsf for this

This is how we can have iterate over column


<h:column>
<h:dataTable border="1" value="#{nested}" var="item">
<h:column>
<hutputText value="#{nested.rowIndex}" />
</h:column>
<h:column>
<hutputText value="#{item}" />
</h:column>
</h:dataTable>
</h:column>


Thanks in advance
Kavita Tipnis
Ranch Hand

Joined: Sep 21, 2008
Posts: 177
Build a datatable programatically,in that case you can have as many columns you want
Pari Gandhi
Greenhorn

Joined: Feb 26, 2009
Posts: 10
See http://www.irian.at/myfacesexamples/crossDataTable.jsf
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How can we represent a matrix like structure in jsf.
 
Similar Threads
dataTable in JSF
Generating Horizontal Menu in JSF using h:dataTable
JSF datatable doubt
Showing database rows as columns
How to handle a list in JSF 2