[rhmessaging-commits] rhmessaging commits: r3217 - mgmt/trunk/notes.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Thu Mar 26 15:24:49 EDT 2009
Author: eallen
Date: 2009-03-26 15:24:49 -0400 (Thu, 26 Mar 2009)
New Revision: 3217
Modified:
mgmt/trunk/notes/javascript session.txt
Log:
Update notes because session was moved under wooly
Modified: mgmt/trunk/notes/javascript session.txt
===================================================================
--- mgmt/trunk/notes/javascript session.txt 2009-03-26 17:32:44 UTC (rev 3216)
+++ mgmt/trunk/notes/javascript session.txt 2009-03-26 19:24:49 UTC (rev 3217)
@@ -1,21 +1,21 @@
-To modify a cumin url, use the session javascript object included in app.js.
+To modify a cumin url, use the session javascript object under wooly.
Usage follows this patern:
- var branch = session.branch(oldUrl);
+ var branch = wooly.session.branch();
branch.parameter1 = value;
var newUrl = branch.marshal();
Example:
- var oldUrl = "index?frame=main.broker.queue;main.m=broker;main.broker.m=queue;main.broker.id=1;main.broker.queue.id=3119";
+ the current window location is "index.html?frame=main.broker.queue;main.m=broker;main.broker.m=queue;main.broker.id=1;main.broker.queue.id=3119";
- // create a branch object from a url string
- var branch = session.branch(oldUrl);
+ // create a branch object
+ var branch = wooly.session.branch();
/* branch is a javascript object with the following properties:
{
- __page: 'index',
+ __page: 'index.html',
frame: 'main.broker.queue',
main.m: 'broker',
main.broker.m: 'queue',
@@ -47,14 +47,17 @@
In cumin, background update urls contain an encoded session value and one or more widget paths.
- For example:
- index.update?session=index%3Fframe%3Dmain.broker.queue%3Bmain.m%3Dbroker%3Bmain.broker.m%3Dqueue%3Bmain.broker.id%3D1%3Bmain.broker.queue.id%3D3119;widget=main.broker.queue.view.tabs.stats.gen.general;widget=main.broker.queue.view.tabs.stats.gen.io
+ For example, a typical background url is:
+ index.update?session=index.html%3Fframe%3Dmain.broker.queue%3Bmain.m%3Dbroker%3Bmain.broker.m%3Dqueue%3Bmain.broker.id%3D1%3Bmain.broker.queue.id%3D3119;widget=main.broker.queue.view.tabs.stats.gen.general;widget=main.broker.queue.view.tabs.stats.gen.io
- Creating a branch object from this background update url will generate:
+ To create a branch from a specific url instead of window.location, use
+ var branch = wooly.session.branch(url);
+
+ Creating a branch object from the above background update url will generate:
{
__page: 'index.update',
session: {
- __page: 'index',
+ __page: 'index.html',
frame: 'main.broker.queue',
main.m: 'broker',
main.broker.m: 'queue',
@@ -68,22 +71,16 @@
}
You can manipulate this object and then call branch.marshal() to generate a new url string.
-
For example, to add the page parameter that tells the widgets to render themselves in "fullpage" mode:
- var backgroundUrl = wooly.updateInfo.url;
- var branch = session.branch(backgroundUrl);
+ var branch = wooly.branchIntervalUpdate();
- // add the fullpage parameter to the session
- branch.session.fullpage = 1;
+ // add the fullpage parameter to a widget
+ branch.session[widgetPath + ".fullpage"] = 1;
- // rengen the url
- backgroundUrl = branch.marshal();
+ // restart the background updates with the new branch
+ wooly.restartIntervalUpdate(branch.marshal());
- // restart the setInterval timer with the new url
- wooly.cancelUpdate(wooly.updateInfo.timerHandle);
- wooly.newSetIntervalUpdate(backgroundUrl, wooly.updateInfo.callback, wooly.updateInfo.interval);
-
More information about the rhmessaging-commits
mailing list