After pressing NEXT it displays next 2 records. How should i get the value of Radio button Selected?? Should i invoke a servlet after the Next button is pressed. That servlet should store those 2 answer & redirect to same page again?
Ankit Kr wrote:Kunal, don't you think that you have messed up the code? I think that will be lot of mixing of codes
Kunal Lakhani wrote:Is that the right way?
Kunal Lakhani wrote:Isn't that very bad style of coding?
If i have to fetch 300records, 5 at a page, then that particular servlet will be invoked 60 times.
Why fetch more records at once than needed?
What is the problem with performing a series of small fetches as they are needed by the user?
And only if they are needed?
Kunal Lakhani wrote:
Isn't that very bad style of coding?
No. Why would it be?
Ankit Kumar Yadav wrote:To me it seems a bad style of coding. Invoking the same servlet again & again for 60times doesn't sounds good
Kunal Lakhani wrote:I am fetching all the records at a time, storing into a list, and displaying as a series of small quantity.
Then we'd just need to know what page we're on, and do the math to fetch the right slice from the list of questions for each page view.