Scenario is such that
1) Data is fetched from a query
2) Query is set at runtime
Assuming there are 2 rows that the query fetches and the max rows is set to 2, then the next and last buttons(navNextButton and navLastButton) are enabled, when clicked on either of them then the same set of 2 rows are displayed but this time all the 4 navigation buttons are disabled.
Similarly when maxrows is set to 5 and if the query yields 6 rows, first 5 rows are displayed and the next,last buttons are enabled, when clicked on either of them only the last 1 row is displayed with the first and prev buttons enabled.
Why is that next and last buttons are enabled in the former case?
regards,
vinoth.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's because we do not now that we on the last page up to the time we reached it. Only if you click next once it's noticed that you are on the last page.
Henner
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sir,
Not very satisfied by the reply. As by your reply then in all cases the next and last buttons should be enabled until we reach the last page.
But in the 2nd case(maxrows - 5, total no of rows -6) its working fine... only first 5 rows are displayed with next and last button enabled, on click of next button only the 6th row alone is displayed with only the first and prev button enabled.
Why is it this way???
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In reality i know that i have reached the last record by maxrows - 1 because i am looking one row further.
In your first example i am looking at row 1 and 2 and not at row 3. So i do not know that the recordset reached it 's end.
See org.dbforms.event.datalist.dao.DataSourceJDBC.java class for details.
And feel free to change it!
Cheers,
Henner
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Scenario is such that
1) Data is fetched from a query
2) Query is set at runtime
Assuming there are 2 rows that the query fetches and the max rows is set to 2, then the next and last buttons(navNextButton and navLastButton) are enabled, when clicked on either of them then the same set of 2 rows are displayed but this time all the 4 navigation buttons are disabled.
Similarly when maxrows is set to 5 and if the query yields 6 rows, first 5 rows are displayed and the next,last buttons are enabled, when clicked on either of them only the last 1 row is displayed with the first and prev buttons enabled.
Why is that next and last buttons are enabled in the former case?
regards,
vinoth.
That's because we do not now that we on the last page up to the time we reached it. Only if you click next once it's noticed that you are on the last page.
Henner
Sir,
Not very satisfied by the reply. As by your reply then in all cases the next and last buttons should be enabled until we reach the last page.
But in the 2nd case(maxrows - 5, total no of rows -6) its working fine... only first 5 rows are displayed with next and last button enabled, on click of next button only the 6th row alone is displayed with only the first and prev button enabled.
Why is it this way???
In reality i know that i have reached the last record by maxrows - 1 because i am looking one row further.
In your first example i am looking at row 1 and 2 and not at row 3. So i do not know that the recordset reached it 's end.
See org.dbforms.event.datalist.dao.DataSourceJDBC.java class for details.
And feel free to change it!
Cheers,
Henner