« Return to Thread: Dwr in remote Xul web applications
I've just packaged a new release of my portal web app including latest 2.0.5
release of Dwr.
It just runs perfectly and very fast with jawr integration.
I would like to point out engine.js changes i've done to make dwr working
into a Mozilla remote Xul context so maybe someone could include it in
future releases, because i think this would be great.
The only 'blocking' issue i found is in the dwr.engine._getJSessionId member
which i rewrote like that
......
/** @private What is our session id? */
dwr.engine._getJSessionId = function() {
if (typeof document.cookie == 'undefined') { // not in a classic html
context so guessing xul
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var cookieManager =
Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager2);
var iter = cookieManager.enumerator;
while (iter.hasMoreElements()) {
var cookie = iter.getNext();
if (cookie instanceof Components.interfaces.nsICookie) {
if (cookie.name == dwr.engine._sessionCookieName)
return cookie.value;
}
}
}
else {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i];
while (cookie.charAt(0) == ' ')
cookie = cookie.substring(1, cookie.length);
if (cookie.indexOf(dwr.engine._sessionCookieName + "=") == 0) {
return cookie.substring(dwr.engine._sessionCookieName.length + 1,
cookie.length);
}
}
}
return "";
}
.........
Regards,
S.PERES-LABOURDETTE
--
View this message in context: http://www.nabble.com/Dwr-in-remote-Xul-web-applications-tp19432203p19432203.html
Sent from the DWR - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...
« Return to Thread: Dwr in remote Xul web applications
| Free embeddable forum powered by Nabble | Forum Help |