show data without trip to server
I have a JSP page where when it loads, it displays summary data from an ArrayList of objects that are stored in the session. There is a radio button for each row in the table and when the user clicks a radio button, there is more detailed information that displays in a second table. Right now, even though I've grabbed all the data I need the first time the JSP page is loaded, I go back to the server using an onclick javascript call and then the servlet just returns me to the page again, with a little flag set to say which one was clicked, so I know what detail information to display. Is there anyway to not go out and back to the server and just "stay" on the JSP page and display more data when the radio button is clicked? We're talking 13000 rows of data, so its slow when the page first loads(no way around that), but then it has to reload a second time, just to show the details. Urgh.
[906 byte] By [
venckmana] at [2007-11-26 17:40:33]

# 1
You've loaded all the data you need onto the html page?
Then you can avoid the server. and just use javascript to show/hide the dependant data.
Of course, given the size of your data wouldn't it better to just load the data you need to display onto the page, and then reload it when you want to display different data?
As a third option, this sounds like an AJAX type application, where you make a request to the server for more data, and it loads it dynamically onto the page without replacing the whole page.
Hope this helps,
evnafets
# 2
But, how to I access say the ith element of an object's ArrayList from Javascript? In Java, for an HTML table element value, I would do something like:
((Details)myObject.getResults().get(i)).getDetailName()
How is that sort of functionality replicated with javascript, or can it be?
# 3
Sorry, guess I misunderstood your initial description.I thought you said all the data was loaded into the html page.If all the data is in the session, then going back to the server is the only way to access it.That means either reloading the page or making an ajax