This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSF and the fly likes Displaying total Number of columns in Datatable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Displaying total Number of columns in Datatable" Watch "Displaying total Number of columns in Datatable" New topic
Author

Displaying total Number of columns in Datatable

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I am planning on displaying the total number of columns in a Datatable, problem is that datatable is dynamic, it is passed a list that is retrieved from the database

this is the Datatable

<t:dataTable var="category" width="700" id="searchList"
rows="10" value="#{searchResult.jobs}">

the outputText is supposed to retrieve the length of value="#{searchResult.jobs}"> and display it on the same page as the datatable, Please hod do i implement this?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15628
    
  15

I think you meant number of rows. Since that's not a repeating item, it wouldn't be appropriate to display it in the datatable itself, you'd normally output it in a separate control such as outputText.


Customer surveys are for companies who didn't pay proper attention to begin with.
Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
Originally posted by Tim Holloway:
I think you meant number of rows. Since that's not a repeating item, it wouldn't be appropriate to display it in the datatable itself, you'd normally output it in a separate control such as outputText.


Yes i meant the number of rows, I have a outputText that would display the number of rows
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying total Number of columns in Datatable
 
Similar Threads
Problem with building columns dynamically using dataTable tag
Problem with h:datatable
Presenting variable number of columns with primefaces datatable
datatable renders empty rows
JSF datatable doubt