aspose file tools
The moose likes JSF and the fly likes adding rows to a datatable, depending on the array size Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "adding rows to a datatable, depending on the array size" Watch "adding rows to a datatable, depending on the array size" New topic
Author

adding rows to a datatable, depending on the array size

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
I have a situation like this:

In my managed bean, i have an array of size 5.

In the faces jsp page, I have a datatable, which refers to this array. I need to display five rows in the datatable. How do I do this?



This displays only one row.
Is there a need for iteration? If so, how do I do it?


SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
vof eka
Greenhorn

Joined: Jun 02, 2006
Posts: 1
The iteration over the dataModel is handled automatically by the dataTable component! please read the documentation about the dataTable for more information, look at the "value" and "var" attributes of the h ataTable...
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: adding rows to a datatable, depending on the array size
 
Similar Threads
using h:selectManyCheckbox inside h:dataTable
Please HELP me. How To Hard Code Values in Each Row of a dataTable?
selectOneMenu in the header of dataTable
color row-x
jsf controls in h:datatable