Hi *,
our system (a Tomcat Web-Application using DWR/AJAX for client-server communication) works like this: some JavaBeans are prepared on the server side. In the client side JavaScript there is a method initialiser(), which gets the existing beans, and they are handed over to some drawing function responsible for displaying those beans on the user interface (in rows of data). The beans are travelling in the HTTP request, better say: in the SessionContainer.
until now there were not too many JavaBeans in the server, so we did not change this way, but now huge masses of data will be loaded into the users window (many rows at loading of the window), and DWR/AJAX is not good for handling this: too slow, etc. I've been told to use either
-custom tags, or
-solve it with the jsp itself
the form is sending form's info to JavaScript functions with help of the post method, as you can see above. It sends information to JavaScript with the "onReset" attribute.
Could some gurus please give me some ideas, what is the way to solve this with either custom tags, or with the jsp itself.
(certainly you don't need to explain me how to develope custom tags, because I can look after this in some tutorials on the Net). I just need the basic ideas, what could be better of these two solutions, and why, and if I choose one of them: how to start with that...
any help greatly appreciated!
thx ,
heeeep
our system (a Tomcat Web-Application using DWR/AJAX for client-server communication) works like this: some JavaBeans are prepared on the server side. In the client side JavaScript there is a method initialiser(), which gets the existing beans, and they are handed over to some drawing function responsible for displaying those beans on the user interface (in rows of data). The beans are travelling in the HTTP request, better say: in the SessionContainer.
Code:
// JavaScript:
function initialiser() {
(...)
// AJAX request to get all beans, callback to redrawMyRows()
MyServerSide.getAllBeans(redrawMyRows);
(...)
}
function redrawMyRows(beansToDraw) {
(...)
clearMyRows();
addMyRows(beansToDraw);
(...)
}
function clearMyRows() {
(...)
var theBody = document.getElementById('theBody');
// Remove all children.
removingAllChildren(theBody);
(...)
}
Code:
Part of our jsp:
<form id="F" name="F" action="" enctype="multipart/form-data" method="post" onReset="return false">
<input name="something" value="<%=request.getParameter("somethingelse") %>"/>
<div id='progress'>Loading...</div>
<table border="0">
<thead>
<tr>
</tr>
</thead>
<tbody id="theBody">
</tbody>
</table>
</form>
until now there were not too many JavaBeans in the server, so we did not change this way, but now huge masses of data will be loaded into the users window (many rows at loading of the window), and DWR/AJAX is not good for handling this: too slow, etc. I've been told to use either
-custom tags, or
-solve it with the jsp itself
the form is sending form's info to JavaScript functions with help of the post method, as you can see above. It sends information to JavaScript with the "onReset" attribute.
Could some gurus please give me some ideas, what is the way to solve this with either custom tags, or with the jsp itself.
(certainly you don't need to explain me how to develope custom tags, because I can look after this in some tutorials on the Net). I just need the basic ideas, what could be better of these two solutions, and why, and if I choose one of them: how to start with that...
any help greatly appreciated!
thx ,
heeeep