[GrooveApp-devel] Another GrooveApp idea for comment
Status: Alpha
Brought to you by:
mbreese
From: Marcus B. <mb...@gm...> - 2006-03-01 23:10:20
|
So, here's another silly idea that I'd like to throw out (in case you're interested). So, it might behoove a new Java framework to work out of the box with Ajax. Well, as you guys now have seen, there really isn't a good way to get data from the server to the client for Ajax calls in Java w/o using the SessionContext. Well, since in GrooveApp, the framework controls the requests, perhaps it would be a good idea to include an Ajax{Request}Context (or GrooveRequestContext). This way, the dev could put an object of interest in that context, and asynchronously call methods to update that object. It wouldn't be too hard to do, as you'd just have to create a new context (if needed), give it an id, and populate it.=20 Then with the next request, you could scan the parameter list for AJAX_CONTEXT_ID (or something like that), and load the appropriate context. The ajax call from the client would just have to include AJAX_CONTEXT_ID in as a parameter in it's call. The Ajax{request}Contexts could be stored as a map in the SessionContext. When a new request comes in, the last AjaxContext could be cleared (or set to timeout in 2 minutes, or something). Ideas? |