Index: /Dev/branches/rest-dojo-ui/client/pages/session.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/pages/session.html	(revision 257)
+++ /Dev/branches/rest-dojo-ui/client/pages/session.html	(revision 257)
@@ -0,0 +1,21 @@
+<div data-dojo-type="rft.ui.Page">
+    <script type="dojo/method" data-dojo-event="init" data-dojo-args="args">
+        require(['dojo/_base/json','dojo/dom','dojo/store/JsonRest','dojo/domReady!'],
+            function(json,dom,JsonRest){
+                var store = new JsonRest({
+                    target:"../server/api.php/data/Session/",
+                    idProperty: 'uid'
+                });
+                store.get(args.uid).then(function(obj){
+                    dom.byId('page_session_form').innerHTML = json.toJson(obj);
+                });
+            });
+    </script>
+    <div class="largeFrame" id="page_session" style="width: 400px;">
+        <div class="largeTitle">Session</div>
+        <div class="content">
+            <div id="page_session_form"></div>
+        </div>
+    </div>
+
+</div>
Index: /Dev/branches/rest-dojo-ui/client/pages/sessions.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/pages/sessions.html	(revision 257)
+++ /Dev/branches/rest-dojo-ui/client/pages/sessions.html	(revision 257)
@@ -0,0 +1,29 @@
+<div data-dojo-type="rft.ui.Page">
+    <script type="dojo/method" data-dojo-event="init" data-dojo-args="args">
+        require(['dojo/store/JsonRest','dojox/grid/DataGrid',
+            Â Â Â Â 'dojo/data/ObjectStore','dojo/domReady!'],
+        function(JsonRest,DataGrid,ObjectStore){
+            var store = new JsonRest({
+                target:"../server/api.php/data/Session/",
+                idProperty: 'uid'
+            });
+            Â Â Â Â var grid = new DataGrid({
+                Â Â Â Â Â Â Â Â store: ObjectStore({objectStore: store}),
+                autoWidth: true,
+                autoHeight: true,
+                Â Â Â Â Â Â Â Â structure: [
+                    Â Â Â Â Â Â Â Â Â Â Â Â {name:"Title", field:"title", width: "200px"},
+                    Â Â Â Â Â Â Â Â Â Â Â Â {name:"Id", field:"uid", width: "200px"}
+                Â Â Â Â Â Â Â Â ]
+            Â Â Â Â }, "page_sessions_grid");
+            Â Â Â Â grid.startup();
+        });
+    </script>
+    <div class="largeFrame" id="page_sessions" style="width: 400px;">
+        <div class="largeTitle">Sessions</div>
+        <div class="content">
+            <div id="page_sessions_grid"></div>
+        </div>
+    </div>
+
+</div>
Index: /Dev/branches/rest-dojo-ui/client/rft/content.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/content.js	(revision 256)
+++ /Dev/branches/rest-dojo-ui/client/rft/content.js	(revision 257)
@@ -1,46 +1,103 @@
-define(['dojo/_base/connect','dojo/_base/xhr','dojo/_base/Deferred','dojo/hash'],function(connect,xhr,Deferred,hash){
-    return new (function() {
-        var self = this;
-        var current = "";
+define(['dojo/_base/declare','dojo/_base/connect','dojo/_base/xhr','dojo/_base/lang','dojo/_base/Deferred','dojo/hash','dojo/io-query','dijit/registry','dijit','rft/util','rft/ui/Page'],
+    function(declare,connect,xhr,lang,Deferred,hash,uriQuery,registry,dijit,util,Page){
+        return new (function() {
+            var self = this;
+            var current = "";
             
-        function init() {
-            connect.subscribe('/dojo/hashchange', function(){
-                var url = hash();
-                self.goTo(url);
+            var HRI = declare(null,{
+                constructor: function(){
+                    this._path = '/';
+                    this._args = {};
+                    if ( arguments.length == 1 ) {
+                        this.hash(arguments[0]);
+                    } else if ( arguments.length == 2 ) {
+                        this.path(arguments[0]);
+                        this.args(arguments[1]);
+                    }
+                },
+                path: function(path) {
+                    if ( path )
+                        this._path = this._fixPath(path);
+                    return this._path;
+                },
+                args: function(args) {
+                    if ( args && lang.isObject(args) )
+                        this._args = args;
+                    return this._args;
+                },
+                hash: function(hash) {
+                    if ( hash && lang.isString(hash) ) {
+                        var parts = hash.split('!');
+                        if ( parts[1] )
+                            this._path = this._fixPath(parts[1]);
+                        if ( parts[2] )
+                            this._args = uriQuery.queryToObject(parts[2]);
+                    }
+                    return '!'+this._path+'!'+uriQuery.objectToQuery(this._args);
+                },
+                _fixPath: function(path) {
+                    if ( !lang.isString(path) || util.isEmptyString(path) ) {
+                        path = "/";
+                    }
+                    if ( path[0] != '/' ) {
+                        path = '/'+path;
+                    }
+                    if ( path[path.length-1] == '/' ) {
+                        path = path + "index";
+                    }
+                    return path;
+                }
             });
-        }
 
-        self.initial = function(location) {
-            if ( current ) {
-                self.goTo(location);
-            }
-            var url = hash();
-            self.goTo(url || location);
-        }
-            
-        self.goTo = function(location) {
-            var contentPane = dijit.byId('content');
-            var d = new Deferred();
-            if ( current == location ) {
-                d.resolve();
+            function _goTo(hri,replace) {
+                var contentPane = dijit.byId('content');
+                var d = new Deferred();
+                var newHash = hri.hash();
+                if ( current == newHash ) {
+                    d.resolve();
+                    return d.promise;
+                }
+                current = newHash;
+                hash(newHash,replace);
+                xhr.get({
+                    url: 'pages'+hri.path()+'.html'
+                })
+                .then(function(html){
+                    contentPane.set('content',html);
+                    var widgets = registry.findWidgets(contentPane.containerNode);
+                    for(var i in widgets) {
+                        if ( widgets[i].isInstanceOf(Page) ) {
+                            widgets[i].init(hri.args());
+                            break;
+                        }
+                    }
+                    d.resolve();
+                },function(){
+                    contentPane.set('content',"Page "+hri.path()+" not found.");
+                    d.reject();
+                });
                 return d.promise;
             }
 
-            current = location;
-            hash(location);
-            xhr.get({
-                url: 'pages/'+location+'/'+location+'.html'
-            })
-            .then(function(content){
-                contentPane.set('content',content);
-                d.resolve();
-            },function(){
-                contentPane.set('content',"Page "+location+" not found.");
-                d.reject();
+            self.initial = function(path,args) {
+                if ( current ) {
+                    return;
+                }
+                if ( hash() ) {
+                    var hri = new HRI(hash());
+                    _goTo(hri, true);
+                } else {
+                    _goTo(new HRI(path,args));
+                }
+            }
+
+            self.goTo = function(path,args) {
+                _goTo(new HRI(path,args));
+            }
+
+            connect.subscribe('/dojo/hashchange', function(){
+                _goTo(new HRI(hash()));
             });
-            return d.promise;
-        }
-            
-        init();
-    })();
-});
+
+        })();
+    });
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/Page.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/Page.js	(revision 256)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/Page.js	(revision 257)
@@ -2,4 +2,6 @@
 function(declare,_WidgetBase,_Container){
     return declare('rft.ui.Page',[_WidgetBase,_Container],{
+        init: function(args){
+        }
     });
 });
Index: /Dev/branches/rest-dojo-ui/client/rft/util.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/util.js	(revision 257)
+++ /Dev/branches/rest-dojo-ui/client/rft/util.js	(revision 257)
@@ -0,0 +1,37 @@
+define(['dojo/_base/lang'],
+    function(lang){
+        return {
+            isEmpty: function(arg) {
+                if ( arg == undefined || arg == null )
+                    return true;
+                if ( lang.isString(arg) )
+                    return this.isEmptyString(arg);
+                if ( lang.isArrayLike(arg) )
+                    return this.isEmptyArray(arg);
+                if ( lang.isObject() )
+                    return this.isEmptyObject(arg);
+                if ( lang.isAlien(arg) )
+                    return false;
+                return false;
+            },
+            isEmptyObject: function(obj) {
+                if ( !lang.isObject(obj) )
+                    return false;
+                for(var prop in obj) {
+                    if(obj.hasOwnProperty(prop)) 
+                        return false;
+                } 
+                return true;
+            },
+            isEmptyString: function(str) {
+                if ( !lang.isString(str) )
+                    return false;
+                return str === '';
+            },
+            isEmptyArray: function(array) {
+                if ( !lang.isArrayLike(array) )
+                    return false;
+                return array.length > 0;
+            }
+        };
+    });
Index: /Dev/branches/rest-dojo-ui/log.txt
===================================================================
--- /Dev/branches/rest-dojo-ui/log.txt	(revision 257)
+++ /Dev/branches/rest-dojo-ui/log.txt	(revision 257)
@@ -0,0 +1,6 @@
+* Replaced jQuery with Dojo for more extensive widgets.
+* Removed some unused JS libraries (d3,RGraph).
+* Changed API to use REST conventions. It is able to login and access
+  database objects. I used the tonic library for that.
+* Login dialog and one page work. The page features a list which is
+  coupled to our REST store with sessions.
