Index: /Dev/branches/rest-dojo-ui/client/rft/content.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/content.js	(revision 398)
+++ /Dev/branches/rest-dojo-ui/client/rft/content.js	(revision 399)
@@ -19,165 +19,109 @@
  * this e.g. to ask confirmation if changed values are not saved.
  */
-define(['dojo/_base/declare','dojo/_base/connect','dojo/_base/xhr','dojo/_base/json',
-    'dojo/_base/lang','dojo/_base/Deferred','dojo/hash','dojo/dom-attr','dojo/dom-construct',
-    'dojo/io-query','dijit','./util','./ui/_Page'],
-    function(declare,connect,xhr,json,lang,Deferred,hash,attr,domConstruct,uriQuery,dijit,util,_Page){
-        return new (function() {
-            var self = this;
+define([
+    'dojo/_base/Deferred',
+    'dojo/_base/json',
+    'dojo/_base/lang',
+    'dojo/_base/xhr',
+    'dojo/dom-attr',
+    'dojo/dom-construct',
+    'dijit/registry',
+    './ui/_Page',
+    'dojo/domReady!'
+],function(Deferred,json,lang,xhr,attr,domConstruct,registry,_Page){
+    return new (function(){
+        var self = this;
+        var inited = false;
 
-            var HRI = declare(null,{
-                constructor: function() {
-                    this._path = this._fixPath('/');
-                    this._args = {};
-                    if ( arguments.length == 1 ) {
-                        this.hash(arguments[0]);
-                    } else if ( arguments.length == 2 ) {
-                        this.path(arguments[0]);
-                        this.args(arguments[1]);
+        var okay = new Deferred();
+        okay.resolve();
+        okay = okay.promise;
+
+        var fail = new Deferred();
+        fail.reject();
+        fail = fail.promise;
+
+        var contentPane = null;
+        self.goToImpl = null;
+        self.initialImpl = null;
+
+        self.init = function() {
+            contentPane = registry.byId('content');
+            inited = true;
+        };
+
+        self.goTo = function(path,args) {
+            if ( !inited ) { return fail; }
+            if ( self.goToImpl !== null ) {
+                return self.goToImpl(path,args);
+            } else {
+                return fail;
+            }
+        };
+
+        self.initial = function(path,args) {
+            if ( !inited ) { return fail; }
+            if ( self.initialImpl !== null ) {
+                return self.initialImpl(path,args);
+            } else {
+                return fail;
+            }
+        };
+
+        self._loadPage = function(path,args) {
+            if ( !inited ) { return fail; }
+            var dfd = new Deferred();
+
+            function getFirstNode(html) {
+                var nodeOrFragment = domConstruct.toDom(html);
+                if (nodeOrFragment instanceof Element) {
+                    return nodeOrFragment;
+                }
+                if (nodeOrFragment instanceof DocumentFragment) {
+                    console.warn("Fragment found, will only use first Element");
+                    for (var i in nodeOrFragment.childNodes) {
+                        var node = nodeOrFragment.childNodes[i];
+                        if (node instanceof Element) {
+                            return node;
+                        }
                     }
-                },
-                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;
                 }
+                return domConstruct.toDom('<div>No Element found in template.</div>');
+            }
+
+            function mixinArgs(node) {
+                var props = {};
+                if ( attr.has(node,'data-dojo-props') ) {
+                    props = json.fromJson(attr.get(node,'data-dojo-props'));
+                }
+                lang.mixin(props,{pageArgs:args});
+                var jsonStr = json.toJson(props);
+                attr.set(node,'data-dojo-props',jsonStr.slice(1,jsonStr.length-1));
+            }
+                
+            // load html
+            var pageUrl = 'rft/pages'+path+'.html';
+            xhr.get({
+                url: pageUrl,
+                failOk: true
+            })
+            // initialize page or create error message
+            .then(function(html){
+                var rootNode = getFirstNode(html);
+                mixinArgs(rootNode);
+                contentPane.set('content',rootNode);
+                var page = registry.byNode(rootNode);
+                if ( !page ) {
+                    page = new _Page({},rootNode);
+                }
+                dfd.resolve(page);
+            },function(){
+                contentPane.set('content',"<div>Page "+path+" not found.</div>");
+                dfd.reject();
             });
 
-            var currentHri = null;
-            var currentPage = null;
-            
-            function _goTo(hri,replace) {
-                var contentPane = dijit.byId('content');
-                var dfd = new Deferred();
-                
-                // if already there, return
-                if ( currentHri && currentHri.hash() === hri.hash() ) {
-                    dfd.resolve();
-                    return dfd.promise;
-                }
-                
-                // check if we can leave current page
-                if ( currentPage ) {
-                    if ( currentPage.onLeave() === false ) {
-                        // restore hash if changed by hand or back button
-                        hash(currentHri.hash());
-                        dfd.reject();
-                        return dfd.promise;
-                    }
-                    currentPage = null;
-                }
-                
-                function getFirstNode(html) {
-                    var nodeOrFragment = domConstruct.toDom(html);
-                    if (nodeOrFragment instanceof Element) {
-                        return nodeOrFragment;
-                    }
-                    if (nodeOrFragment instanceof DocumentFragment) {
-                        console.warn("Fragment found, will only use first Element");
-                        for (i in nodeOrFragment.childNodes) {
-                            var node = nodeOrFragment.childNodes[i];
-                            if (node instanceof Element) {
-                                return node;
-                            }
-                        }
-                    }
-                    return domConstruct.toDom('<div>No Element found in template.</div>');
-                }
+            return dfd.promise;
+        };
 
-                function mixinArgs(node) {
-                    var props = {};
-                    if ( attr.has(node,'data-dojo-props') ) {
-                        props = json.fromJson(attr.get(node,'data-dojo-props'));
-                    }
-                    lang.mixin(props,{pageArgs:hri.args()});
-                    var jsonStr = json.toJson(props);
-                    attr.set(node,'data-dojo-props',jsonStr.slice(1,jsonStr.length-1));
-                }
-                
-                // update hash
-                currentHri = hri;
-                hash(hri.hash(),replace);
-                
-                // load html
-                var pageUrl = 'rft/pages'+hri.path()+'.html';
-                xhr.get({
-                    url: pageUrl,
-                    failOk: true
-                })
-                
-                // initialize page or create error message
-                .then(function(html){
-                    var rootNode = getFirstNode(html);
-                    mixinArgs(rootNode);
-                    contentPane.set('content',rootNode);
-                    currentPage = dijit.byNode(rootNode);
-                    if ( !currentPage ) {
-                        currentPage = new _Page({},rootNode);
-                    }
-                    dfd.resolve();
-                },function(){
-                    contentPane.set('content',"<div>Page "+hri.path()+" not found.</div>");
-                    dfd.reject();
-                });
-                return dfd.promise;
-            }
-
-            self.initial = function(path,args) {
-                if ( currentHri ) {
-                    var dfd = new Deferred();
-                    dfd.resolve();
-                    return dfd.promise;
-                }
-                if ( hash() ) {
-                    var hri = new HRI(hash());
-                    return _goTo(hri, true);
-                } else {
-                    return _goTo(new HRI(path,args));
-                }
-            };
-
-            self.goTo = function(path,args) {
-                return _goTo(new HRI(path,args));
-            }
-
-            self.getArgs = function() {
-                if ( currentHri ) {
-                    return currentHri.args();
-                } else {
-                    return {};
-                }
-            };
-
-            connect.subscribe('/dojo/hashchange', function(){
-                _goTo(new HRI(hash()));
-            });
-
-        })();
-    });
+    })();
+});
Index: /Dev/branches/rest-dojo-ui/client/rft/indexContent.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/indexContent.js	(revision 399)
+++ /Dev/branches/rest-dojo-ui/client/rft/indexContent.js	(revision 399)
@@ -0,0 +1,117 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/Deferred',
+    'dojo/_base/lang',
+    'dojo/hash',
+    'dojo/topic',
+    'dojo/io-query',
+    './content',
+    './util',
+],function(declare,Deferred,lang,hash,topic,uriQuery,content,util){
+        return new (function() {
+
+            var HRI = declare(null,{
+                constructor: function() {
+                    this._path = this._fixPath('/');
+                    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;
+                }
+            });
+
+            var currentHri = null;
+            var currentPage = null;
+            
+            function _goTo(hri,replace) {
+                var dfd = new Deferred();
+                
+                // if already there, return
+                if ( currentHri && currentHri.hash() === hri.hash() ) {
+                    dfd.resolve();
+                    return dfd.promise;
+                }
+                
+                // check if we can leave current page
+                if ( currentPage ) {
+                    if ( currentPage.onLeave() === false ) {
+                        // restore hash if changed by hand or back button
+                        hash(currentHri.hash());
+                        dfd.reject();
+                        return dfd.promise;
+                    }
+                    currentPage = null;
+                }
+                
+                // update hash
+                currentHri = hri;
+                hash(hri.hash(),replace);
+                
+                content._loadPage(hri.path(),hri.args())
+                .then(function(page){
+                    currentPage = page;
+                    dfd.resolve();
+                });
+
+                return dfd.promise;
+            }
+
+            content.initialImpl = function(path,args) {
+                if ( currentHri ) {
+                    var dfd = new Deferred();
+                    dfd.resolve();
+                    return dfd.promise;
+                }
+                if ( hash() ) {
+                    var hri = new HRI(hash());
+                    return _goTo(hri, true);
+                } else {
+                    return _goTo(new HRI(path,args));
+                }
+            };
+
+            content.goToImpl = function(path,args) {
+                return _goTo(new HRI(path,args));
+            };
+
+            topic.subscribe('/dojo/hashchange', function(){
+                _goTo(new HRI(hash()));
+            });
+
+        })();
+    });
Index: /Dev/branches/rest-dojo-ui/client/rft/pages/survey.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/pages/survey.js	(revision 398)
+++ /Dev/branches/rest-dojo-ui/client/rft/pages/survey.js	(revision 399)
@@ -99,5 +99,5 @@
             },
             _onShowPreview: function() {
-                content.goTo('surveyAdvanced', {uid: store.getIdentity(this.survey)});
+                content.goTo('previewSurvey', {uid: store.getIdentity(this.survey)});
             }
         });
Index: /Dev/branches/rest-dojo-ui/client/rft/pages/viewSurvey.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/pages/viewSurvey.html	(revision 399)
+++ /Dev/branches/rest-dojo-ui/client/rft/pages/viewSurvey.html	(revision 399)
@@ -0,0 +1,26 @@
+<div data-dojo-type="rft.pages.viewSurvey" class="blue">
+    <div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'center'" style="height: 500px;">
+
+        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
+            <h2>
+                <span class="rftIcon rftIconSurvey"></span>
+                <span class="headerText" data-rft-attach-point="titleNode">Survey</span>
+            </h2>
+        </div>
+        
+        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'" data-rft-attach-point="questionsPane">
+        </div>
+        
+        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'bottom'">
+            <button data-dojo-type="dijit.form.Button"
+                    type="submit"
+                    data-rft-attach-event="onClick:_onSubmit">
+                Submit</button>
+            <button data-dojo-type="dijit.form.Button"
+                    type="button"
+                    data-rft-attach-event="onClick:_onCancel">
+                Cancel</button>
+        </div>
+
+    </div>
+</div>
Index: /Dev/branches/rest-dojo-ui/client/rft/pages/viewSurvey.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/pages/viewSurvey.js	(revision 399)
+++ /Dev/branches/rest-dojo-ui/client/rft/pages/viewSurvey.js	(revision 399)
@@ -0,0 +1,48 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/Deferred',
+    'dojo/_base/event',
+    'dojo/_base/lang',
+    '../store',
+    '../ui/_Page',
+    '../ui/content/ContentWidgetFactory'
+    ],
+    function(array,declare,Deferred,event,lang,store,_Page,ContentWidgetFactory){
+        return declare('rft.pages.viewSurvey',[_Page],{
+            survey: null,
+            constructor: function(){
+                this._dataMap = {};
+            },
+            onVisit: function() {
+                if ( this.pageArgs.uid ) {
+                    Deferred.when(store.get(this.pageArgs.uid))
+                    .then(lang.hitch(this,function(obj){
+                        var f = new ContentWidgetFactory();
+                        this.survey = obj;
+                        store.query(null,{keys:this.survey.questions,include_docs:true})
+                        .forEach(function(question){
+                            array.forEach(question.content,function(item){
+                                var w = f.createViewWidget(item);
+                                if ( w !== null ) {
+                                    w.placeAt(this.questionsPane.containerNode,'last');
+                                    w.startup();
+                                }
+                            },this);
+                        },this);
+                    }));
+                } else {
+                    throw "No valid uid or survey passed!";
+                }
+            },
+            _onSubmit: function(evt) {
+                event.stop(evt);
+                return false;
+            },
+            _onCancel: function(evt) {
+                event.stop(evt);
+                return false;
+            }
+        });
+});
+
Index: /Dev/branches/rest-dojo-ui/client/rft/run.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 398)
+++ /Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 399)
@@ -1,4 +1,3 @@
 require([
-    // functions required for run
     'dojo/_base/connect',
     'dojo/_base/window',
@@ -8,72 +7,24 @@
     'rft/content',
     'rft/ui/LoginDialog',
-    'dojo/domReady!',
-    
-    // dijit & rft widgets used declaratively in templates and pages
-    'dijit/Dialog',
-    'dijit/DropDownMenu',
-    'dijit/InlineEditBox',
-    'dijit/MenuBar',
-    'dijit/MenuBarItem',
-    'dijit/PopupMenuBarItem',
-    'dijit/TitlePane',
-    'dijit/layout/AccordionContainer',
-    'dijit/layout/BorderContainer',
-    'dijit/layout/ContentPane',
-    'dijit/layout/TabContainer',
-    'dijit/form/Button',
-    'dijit/form/ComboBox',
-    'dijit/form/DateTextBox',
-    'dijit/form/Form',
-    'dijit/form/NumberSpinner',
-    'dijit/form/Select',
-    'dijit/form/SimpleTextarea',
-    'dijit/form/Textarea',
-    'dijit/form/TextBox',
+    'rft/indexContent',
+    'rft/stddeps',
+    'dojo/domReady!'
+],function(connect,win,dom,parser,auth,content,LoginDialog) {
+    parser.parse();
+    content.init();
 
-    'dojox/grid/DataGrid',
+    var login = new LoginDialog().placeAt(win.body());
+    login.startup();
 
-    'rft/ui/LineWithActionsWidget',
-    'rft/ui/MainMenu',
-    'rft/ui/MenuBarLink',
-    'rft/ui/MenuLink',
-    'rft/ui/Notifications',
-    'rft/ui/ObjectBox',
-    'rft/ui/QuestionWidget',
-    'rft/ui/Selector',
-    'rft/ui/TitleGroup',
-    'rft/ui/lists/AccountListView',
-    'rft/ui/lists/List',
-    'rft/ui/lists/OrderedList',
-
-    // pages -> load dynamically?
-    'rft/pages/index',
-    'rft/pages/questions',
-    'rft/pages/question',
-    'rft/pages/session',
-    'rft/pages/sessions',
-    'rft/pages/surveys',
-    'rft/pages/survey'
-    ],
-    function(connect,win,dom,parser,auth,content,LoginDialog) {
-        parser.parse();
-
-        var login = new LoginDialog().placeAt(win.body());
-        login.startup();
-
-        auth.restore()
-        .then(function(){
-            content.initial();
-        },function(){
-            login.show();
-        });
-
-        connect.connect(dom.byId('loginMenu'),'click',function(){
-            login.show();
-        });
-
+    auth.restore()
+    .then(function(){
+        content.initial();
+    },function(){
+        login.show();
     });
 
-function goToPage(page) {
-    throw "Obsolete navigation to "+page;
-}
+    connect.connect(dom.byId('loginMenu'),'click',function(){
+        login.show();
+    });
+
+});
Index: /Dev/branches/rest-dojo-ui/client/rft/stddeps.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/stddeps.js	(revision 399)
+++ /Dev/branches/rest-dojo-ui/client/rft/stddeps.js	(revision 399)
@@ -0,0 +1,48 @@
+define([
+    // dijit & rft widgets used declaratively in templates and pages
+    'dijit/Dialog',
+    'dijit/DropDownMenu',
+    'dijit/InlineEditBox',
+    'dijit/MenuBar',
+    'dijit/MenuBarItem',
+    'dijit/PopupMenuBarItem',
+    'dijit/TitlePane',
+    'dijit/layout/AccordionContainer',
+    'dijit/layout/BorderContainer',
+    'dijit/layout/ContentPane',
+    'dijit/layout/TabContainer',
+    'dijit/form/Button',
+    'dijit/form/ComboBox',
+    'dijit/form/DateTextBox',
+    'dijit/form/Form',
+    'dijit/form/NumberSpinner',
+    'dijit/form/Select',
+    'dijit/form/SimpleTextarea',
+    'dijit/form/Textarea',
+    'dijit/form/TextBox',
+
+    'dojox/grid/DataGrid',
+
+    'rft/ui/LineWithActionsWidget',
+    'rft/ui/MainMenu',
+    'rft/ui/MenuBarLink',
+    'rft/ui/MenuLink',
+    'rft/ui/Notifications',
+    'rft/ui/ObjectBox',
+    'rft/ui/QuestionWidget',
+    'rft/ui/Selector',
+    'rft/ui/TitleGroup',
+    'rft/ui/lists/AccountListView',
+    'rft/ui/lists/List',
+    'rft/ui/lists/OrderedList',
+
+    // pages -> load dynamically?
+    'rft/pages/index',
+    'rft/pages/questions',
+    'rft/pages/question',
+    'rft/pages/session',
+    'rft/pages/sessions',
+    'rft/pages/surveys',
+    'rft/pages/survey',
+    'rft/pages/viewSurvey'
+],function(){});
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js	(revision 398)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js	(revision 399)
@@ -45,4 +45,5 @@
                     this.innerWidget.placeAt(this.containerNode);
                     this.innerWidget.startup();
+                    this.innerWidget.set('readOnly',true);
                 }
                 this.titleNode.innerHTML = this.item.type+" [preview]";
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js	(revision 398)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js	(revision 399)
@@ -86,11 +86,13 @@
                 this._textBox = new TextBox();
                 this._textBox.set('value', this.options.contents);
-                this._textBox.set('readOnly', true);
                 this.addChild(this._textBox);
             },
             _getValueAttr: function() {
                 return {    type: 'Header',
-                            contents: this._textBox.get('displayedValue'),
-                };
+                            contents: this._textBox.get('displayedValue')
+                };
+            },
+            _setReadOnlyAttr: function(value) {
+                this._textBox.set('readOnly', value);
             }
         });
@@ -107,5 +109,5 @@
             _getValueAttr: function() {
                 return { type: 'Header',
-                         contents: this._textBox.get('displayedValue'),
+                         contents: this._textBox.get('displayedValue')
                 };
             }
@@ -117,12 +119,14 @@
                 this._textArea = new Textarea();
                 this._textArea.set('value', this.options.contents);
-                this._textArea.set('readOnly', true);
                 this.addChild(this._textArea);
             },
             _getValueAttr: function() {
                 return { type: 'Text',
-                         contents: this._textArea.get('displayedValue'),
-                };
-            },
+                         contents: this._textArea.get('displayedValue')
+                };
+            },
+            _setReadOnlyAttr: function(value) {
+                this._textBox.set('readOnly', value);
+            }
         });
 
@@ -149,5 +153,4 @@
                 this._textArea = new Textarea();
                 this._textArea.set('maxLength', this.options.maxLength || 1000);
-                this._textArea.set('readOnly', this.options.readOnly || false);
                 this._textArea.set('value', this.options.defaultValue || "");
                 this.addChild(this._textArea);
@@ -156,7 +159,9 @@
                 return { type: "FreeTextInput",
                          defaultValue: this.options.defaultValue,
-                         readOnly: this.options.readOnly,
                          maxLength: this.options.maxLength
                 };
+            },
+            _setReadOnlyAttr: function(value) {
+                this._textArea.set('readOnly', value);
             }
         });
Index: /Dev/branches/rest-dojo-ui/client/rft/view.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/view.js	(revision 399)
+++ /Dev/branches/rest-dojo-ui/client/rft/view.js	(revision 399)
@@ -0,0 +1,18 @@
+require([
+    'dojo/parser',
+    'rft/auth',
+    'rft/content',
+    'rft/stddeps',
+    'rft/viewContent',
+    'dojo/domReady!'
+],function(parser,auth,content) {
+    parser.parse();
+    content.init();
+
+    auth.restore()
+    .then(function(){
+        content.initial();
+    },function(){
+    });
+
+});
Index: /Dev/branches/rest-dojo-ui/client/rft/viewContent.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/viewContent.js	(revision 399)
+++ /Dev/branches/rest-dojo-ui/client/rft/viewContent.js	(revision 399)
@@ -0,0 +1,20 @@
+define([
+    'dojo/hash',
+    'dojo/io-query',
+    './content'
+],function(hash,uriQuery,content){
+    return new (function(){
+
+            content.initialImpl = function(path,args) {
+                args = args || {};
+                if ( hash() ) {
+                    var parts = hash().split('!');
+                    if ( parts[1] ) {
+                        args = uriQuery.queryToObject(parts[1]);
+                    }
+                }
+                return content._loadPage('/viewSurvey',args);
+            };
+
+    })();
+});
Index: /Dev/branches/rest-dojo-ui/client/view.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/view.html	(revision 399)
+++ /Dev/branches/rest-dojo-ui/client/view.html	(revision 399)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title>Survey</title>
+        <link rel="stylesheet" type="text/css" href="dojotoolkit/dijit/themes/claro/claro.css" />
+        <link rel="stylesheet" type="text/css" href="dojotoolkit/dojox/grid/resources/Grid.css" />
+        <link rel="stylesheet" type="text/css" href="dojotoolkit/dojox/grid/resources/claroGrid.css" />
+        <link rel="stylesheet" type="text/css" href="dojotoolkit/dojox/widget/Toaster/Toaster.css" />
+        <link rel="stylesheet" type="text/css" href="rft/css/main.css" />
+        <script type="text/javascript" src="dojotoolkit/dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: false, tlmSiblingOfDojo: false, isDebug: true, baseUrl: '', packagePaths: {'dojotoolkit':['dojo','dijit', 'dojox'], '.':['rft']}"></script>
+        <script type="text/javascript" src="rft/view.js"></script>
+    </head>
+    <body class="dijitReset claro">
+        <div class="page" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'center'" style="width: 100%; height: 100%;">
+            <div class="topbar" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
+                <h1>Survey</h1>
+            </div>
+            <div id="content" class="content" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
+            </div>
+        </div>
+        <div id="toaster" data-dojo-type="rft.ui.Notifications">
+        </div>
+    </body>
+</html>
