engine.js could be improved to share 1 reverse ajax connection between all windows.
Something along the lines of
dwr.engine.setReverseAjax(dwr.engine.SHARED)
In the SHARED mode
1. All reverse ajax windows register themselves as listeners with the top level onload
2. Only the top level window performs the reverse ajax poll
3. When javascript is received via reverse ajax, it is executed on all listening windows
4. If a window is closed, it is removed (or ignored) from the listeners
The attachment simulates a mock reverse ajax poll and executes functions on all child windows spawned by clicking the link.
engine.js could be improved to share 1 reverse ajax connection between all windows.
Something along the lines of
dwr.engine.setReverseAjax(dwr.engine.SHARED)
In the SHARED mode
1. All reverse ajax windows register themselves as listeners with the top level onload
2. Only the top level window performs the reverse ajax poll
3. When javascript is received via reverse ajax, it is executed on all listening windows
4. If a window is closed, it is removed (or ignored) from the listeners
The attachment simulates a mock reverse ajax poll and executes functions on all child windows spawned by clicking the link.
A few considerations
a. Listeners register themselves with their scriptSessionId
b. Top level reverse ajax poll sends a list of scriptSessionIds to the server
c. Server responds with a map of javascript to execute, keyed by scriptSessionId
d. Top level window distributes the javascript to child windows, based on session id
e. If top level window is closed, a new top level will need to be assigned
Lance Semmens added a comment - 18/Mar/09 11:56 AM A few considerations
a. Listeners register themselves with their scriptSessionId
b. Top level reverse ajax poll sends a list of scriptSessionIds to the server
c. Server responds with a map of javascript to execute, keyed by scriptSessionId
d. Top level window distributes the javascript to child windows, based on session id
e. If top level window is closed, a new top level will need to be assigned
A few considerations
a. Listeners register themselves with their scriptSessionId
b. Top level reverse ajax poll sends a list of scriptSessionIds to the server
c. Server responds with a map of javascript to execute, keyed by scriptSessionId
d. Top level window distributes the javascript to child windows, based on session id
e. If top level window is closed, a new top level will need to be assigned