This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to inform the total rows to trinidad table

 
Jeya Balaji
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using <tr:table> to list the data passed on from a bean. The range listener is working fine and I get the current start row. But if I pass only 25 (default number of rows per page), <tr:table> is displaying only those 25 rows and "prev", "next" links are missing. Is there a way to set the total rows to <tr:table>.

Let me go back to search more.
[ January 14, 2008: Message edited by: Jeya Balaji ]
 
Dushyant Agarwal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
as far as I perceive your problem - Your navigation buttons disappear if your total number of records displayed in one page are all the there are to be displayed!!!

If this is the case then I think that there would be no need to apply navigation as no other records are there to navigate to. The <tr:table> component is intelligently removing the buttons to avoid ambiguity for the user..(I have tried this using standard JSF...It is very hard to achieve programmatically!!)
 
Jeya Balaji
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, Dushyant. It is other way around. Let us say that I have 60 records, Instead of sending all at one shot, I want to send 25 at a time. Since I can get the starting row and number of rows per page, I can choose which 25 to send.

However, if I send 25, tr:table assumes that I have only 25 records (and hence doesnt allow me to navigate further). So, I want to tell tr:table that there are 60 rows in total.
 
Dushyant Agarwal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
first let me clarify that I have never worled with tr;table before.

That is why I want to know:

if I send 25, tr:table assumes that I have only 25 records


Does this mean that in the value binding of the tr:table you are passing only 25 records at first attempt?? If so, then I would suggest you to pass
60 records altogether. Paging is provided intr:tbale I am sure it would show only the specified number of records in one page.
 
Jeya Balaji
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, I dont want to load and pass all 60 when only 25 will be displayed. May be the number 60 is small enough to pass around. Assume the total number to be in thousands or millions. It wont be feasible to collect all records and send them for displaying only a small portion.

There should be a way to send only the records that would be displayed and the table asking for more records.
 
Dushyant Agarwal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

There should be a way to send only the records that would be displayed and the table asking for more records.


I don't think that the table is going to itself ask for more records until it knows exactly how many records are there to be displayed in total. I mean it is not going to request for more records. All it can do is display a fixed number of records at a time.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic