Index: Dev/branches/rest-dojo-ui/client/rft/elastic/ElasticReadStore.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/elastic/ElasticReadStore.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/elastic/ElasticReadStore.js	(revision 384)
@@ -7,52 +7,47 @@
     ],function(declare, json, lang, xhr, QueryReadStore) {
 
-	return declare("rft.elastic.ElasticReadStore", QueryReadStore, {
-	    fetch:function(request){
-	    	var attr = Object.keys(request.query)[0];
-	    	if (request.query[attr].length == 0) {
-	    		return 0;
-	    	}
-	    	var q = request.query[attr];
+    return declare("rft.elastic.ElasticReadStore", QueryReadStore, {
+        fetch:function(request){
+            var attr = Object.keys(request.query)[0];
+            if (request.query[attr].length == 0) {
+                return 0;
+            }
+            var q = request.query[attr];
 
-	    	request.serverQuery = json.toJson({ 
-		    						query: 
-		    						{
-		    							query_string: 
-		    							{
-		    								default_field: attr, 
-		    								query: q
-		    							}
-		    						}
-		    					});
-		    // Call superclasses' fetch
-		    return this.inherited("fetch", arguments);
-		  },
-		_fetchItems: function(request, fetchHandler, errorHandler){
-			var serverQuery = request.serverQuery;
-			var xhrHandler = xhr.post({
+            request.serverQuery = json.toJson({ 
+                query: {
+                    query_string: {
+                        default_field: attr, 
+                        query: q
+                    }
+                }
+            });
+            return this.inherited(arguments);
+          },
+        _fetchItems: function(request, fetchHandler, errorHandler){
+            var serverQuery = request.serverQuery;
+            var xhrHandler = xhr.post({
                 url: this.url,
                 handleAs: "json",
                 postData: serverQuery
+            }).then(lang.hitch(this, function(data){
+                this._xhrFetchHandler(data, request, fetchHandler, errorHandler);
+            }),function(error){
+                errorHandler(error, request);
             });
-			request.abort = function(){
-				xhrHandler.cancel();
-			};
-			xhrHandler.addCallback(lang.hitch(this, function(data){
-				this._xhrFetchHandler(data, request, fetchHandler, errorHandler);
-			}));
-			xhrHandler.addErrback(function(error){
-				errorHandler(error, request);
-			});
-		},
-		_xhrFetchHandler: function(data, request, fetchHandler, errorHandler) {
-			data = this._filterResponse(data);
-			this._items = [];
-			var numHits = data.hits.total || -1;
-			if(numHits > 0) {
-				this._items.push({i:data.hits.hits[0]._source, r:this, n:0});
-			}
-			fetchHandler(this._items, request, data.hits.total);
-			this._numRows = data.hits.total;
-		}
-	});
+            request.abort = function(){
+                xhrHandler.cancel();
+            };
+        },
+        _xhrFetchHandler: function(data, request, fetchHandler, errorHandler) {
+            data = this._filterResponse(data);
+            this._items = [];
+            var numHits = data.hits.total || -1;
+            if(numHits > 0) {
+                this._items.push({i:data.hits.hits[0]._source, r:this, n:0});
+            }
+            fetchHandler(this._items, request, data.hits.total);
+            this._numRows = data.hits.total;
+        }
+    });
 })
Index: Dev/branches/rest-dojo-ui/client/rft/pages/session.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/session.html	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/session.html	(revision 384)
@@ -14,11 +14,11 @@
                         <h3>Basic</h3>
                         <fieldset class="align">
-                            <label for="titleInput">Title</label>
+                            <label for="title">Title</label>
                             <input type="text" name="title" data-dojo-type="dijit.form.TextBox" data-dojo-props="placeHolder: 'Enter title here'" />
                             <br/>
-                            <label for="descriptionInput">Description</label>
+                            <label for="description">Description</label>
                             <textarea name="description" rows="3" cols="54" data-dojo-type="dijit.form.SimpleTextarea" data-dojo-props="selectOnClick: true, placeHolder: 'Description shown in tooltips'"></textarea>
                             <br/>
-                            <label for="dateInput">Planned date</label>
+                            <label for="plannedDate">Planned date</label>
                             <input type="text" name="plannedDate" data-dojo-type="dijit.form.DateTextBox" required="required" />
                         </fieldset>
@@ -26,15 +26,15 @@
                         <h3>Accounts</h3>
                         <fieldset class="align">
-                            <label for="accountsInput">Add new</label>
-                            <select id="accountBox"></select>
+                            <label for="accountSelector">Add new</label>
+                            <select data-rft-attach-point="accountSelector"></select>
                             <button data-rft-attach-point="btnInvite" data-dojo-type="dijit.form.Button" data-rft-attach-event="onClick:onInvite" data-dojo-props="baseClass: 'rftBlockButton', class: 'green', iconClass: 'rftIcon rftIconPlus'">Invite</button>
                             <br/><br/>
                             
-                            <div data-rft-attach-point="listViewNode" class="rftAccountListView">
+                            <div data-rft-attach-point="accountListNode" class="rftAccountListView">
                             </div>
                         </fieldset>
 
-                        <button data-rft-attach-point="btnPropertiesDiscard" data-dojo-type="dijit.form.Button" data-rft-attach-event="onClick:onDiscard" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconCancel'">Discard changes</button>
-                        <button data-rft-attach-point="btnPropertiesSave" data-dojo-type="dijit.form.Button" data-rft-attach-event="onClick:onSave" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconAccept'">Save changes</button>
+                        <button data-dojo-type="dijit.form.Button" data-rft-attach-event="onClick:onDiscard" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconCancel'">Discard changes</button>
+                        <button data-dojo-type="dijit.form.Button" data-rft-attach-event="onClick:onSave" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconAccept'">Save changes</button>
 
                     </div>
@@ -42,6 +42,4 @@
                 </div>
                 <div data-dojo-type="dijit.layout.ContentPane" title="Design">
-                    <!--DESIGN-->
-
                     <div class="rftSessionObject green">
                         <div class="rftIcon rftIconSurvey"></div>
Index: Dev/branches/rest-dojo-ui/client/rft/pages/session.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/session.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/session.js	(revision 384)
@@ -1,34 +1,33 @@
-define(['dojo/_base/declare',
-	'dojo/_base/lang',
-	'dojo/_base/event',
-	'dojo/_base/Deferred',
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/_base/event',
+    'dojo/_base/Deferred',
     'rft/elastic/ElasticSearchFilteringSelect',
     'rft/elastic/ElasticReadStore',
-	'rft/store',
-	'rft/ui/_Page',
-	'rft/content',
+    'rft/store',
+    'rft/ui/_Page',
+    'rft/content',
     'rft/ui/AccountListView'
     ],
-	function(declare,lang,event,Deferred,ElasticSearchFilteringSelect,ElasticReadStore,store,_Page,content,AccountListView){
-		return declare('rft.pages.session',[_Page],{
-			session: null,
-			_listView: null,
+    function(array,declare,lang,event,Deferred,ElasticSearchFilteringSelect,ElasticReadStore,store,_Page,content,AccountListView){
+        return declare('rft.pages.session',[_Page],{
+            session: null,
+            _accountList: null,
             _select: null,
-			onVisit: function() {
-				if ( this.pageArgs.uid ) {
-					Deferred.when(store.get(this.pageArgs.uid))
-					.then(lang.hitch(this,function(obj){
-						this.session = obj;
-                        this._setupListView();
+            onVisit: function() {
+                if ( this.pageArgs.uid ) {
+                    Deferred.when(store.get(this.pageArgs.uid))
+                    .then(lang.hitch(this,function(obj){
+                        this.session = obj;
+                        this._setupAccountList();
                         this._refresh();
-					}));
+                    }));
                     this._setupAutoComplete();
-				} else {
-					throw "No valid uid or session passed!";
-				}
-			},
-			onLeave: function() {
-				this.inherited(arguments);
-			},
+                } else {
+                    throw "No valid uid or session passed!";
+                }
+            },
             _refresh: function() {
                 this.titleNode.innerHTML = this.session.title || '';
@@ -41,4 +40,7 @@
             onSave: function(evt) {
                 lang.mixin(this.session,this.propertiesForm.get('value'));
+                this.session.accounts = array.map(this._accountList.getItems(),function(item){
+                    return store.getIdentity(item);
+                });
                 store.put(this.session)
                 .then(function(){
@@ -55,25 +57,14 @@
             },
             _addAccount: function(item) {
-                if (!this.session.accounts) 
-                    this.session.accounts = [];
-                this.session.accounts.push(item);
-                this._listView.insertItem(item);
+                this._accountList.insertItem(item);
             },
-            _removeAccount: function(item) {
-                this.session.accounts.splice(this.session.accounts.indexOf(item), 1);
-            },
-            _setupListView: function() {
-                this._listView = new AccountListView( {
-                    controller: this,
-                    removeCallback: lang.hitch(this, this._removeAccount)
-                }).placeAt(this.listViewNode);
-                for (account in this.session.accounts) {
-                    this._listView.insertItem(this.session.accounts[account]);
+            _setupAccountList: function() {
+                this._accountList = new AccountListView().placeAt(this.accountListNode);
+                this._accountList.startup();
+                for (var account in this.session.accounts) {
+                    this._accountList.insertItem(this.session.accounts[account]);
                 }
-
-                this._listView.startup();
             },
             _setupAutoComplete: function() {
-
                 var accountStore = new ElasticReadStore({
                     url: "http://localhost:9200/rft/_search",
@@ -81,5 +72,4 @@
                 });
                 this._select = new ElasticSearchFilteringSelect({
-                    name: "accountBox",
                     store: accountStore,
                     autoComplete: false,
@@ -90,12 +80,11 @@
                     hasDownArrow: false,
                     style: "width: 400",
-                    searchAttr: "title",
-                    id: "accountText"
-                }, "accountBox");
+                    searchAttr: "title"
+                }, this.accountSelector);
                 this._select.startup();
             }
 
 
-		});
-});
+        });
+    });
 
Index: Dev/branches/rest-dojo-ui/client/rft/pages/sessions.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/sessions.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/sessions.js	(revision 384)
@@ -1,4 +1,11 @@
-define(['dojo/_base/declare','dojo/_base/lang','rft/store','rft/content','rft/ui/_Page','rft/ui/ObjectBox'],
-    function(declare,lang,store,content,_Page,ObjectBox){
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/date/stamp',
+    'rft/store',
+    'rft/content',
+    'rft/ui/_Page',
+    'rft/ui/ObjectBox'],
+    function(declare,lang,dateStamp,store,content,_Page,ObjectBox){
         return declare('rft.pages.sessions',[_Page],{
             templateActions: null,
@@ -55,10 +62,9 @@
             },
             _publishSession: function(sessionTemplate) {
-                var publishDate = new Date();
                 var session = lang.clone(sessionTemplate);
                 delete session[store.idProperty];
                 delete session[store.revProperty];
                 session.type = "SessionInstance";
-                session.date = publishDate.getDate()+"-"+publishDate.getMonth()+"-"+publishDate.getFullYear();
+                session.publishedDate = dateStamp.toISOString(new Date(),{zulu: true});
                 session.creator = "Igor Mayer";
                 store.add(session)
Index: Dev/branches/rest-dojo-ui/client/rft/pages/survey.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/survey.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/survey.js	(revision 384)
@@ -8,9 +8,9 @@
     'rft/store',
     'rft/ui/_Page',
-    'rft/ui/OrderedDndList',
+    'rft/ui/QuestionListView',
     'rft/ui/TabbedQuestionBrowser'
     ],
     function(array,declare,Deferred,event,lang,content,store,_Page,
-             OrderedDndList,TabbedQuestionBrowser){
+             QuestionListView,TabbedQuestionBrowser){
         return declare('rft.pages.survey',[_Page],{
             survey: null,
@@ -58,6 +58,5 @@
             },
             _setupListView: function() {
-                this.questionList = new OrderedDndList({
-                    type: 'question',
+                this.questionList = new QuestionListView({
                     region: 'center'
                 }).placeAt(this.surveyListViewNode);
Index: Dev/branches/rest-dojo-ui/client/rft/ui/AccountListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/AccountListView.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/AccountListView.js	(revision 384)
@@ -2,64 +2,42 @@
     'dojo/_base/declare',
    	'dojo/_base/lang',
-    'dijit/_WidgetBase',
-    'dijit/_TemplatedMixin',
-    'dijit/_WidgetsInTemplateMixin',
-    'dijit/_Container',
+    'dojo/dom-construct',
     'rft/ui/LineWithActionsWidget',
-    'rft/ui/OrderedList',
-    'dojo/text!./templates/AccountListView.html'
+    'rft/ui/OrderedList'
 	],function(
         declare,
         lang,
-        _WidgetBase,
-        _TemplatedMixin,
-        _WidgetsInTemplateMixin,
-        _Container,
+        domConstruct,
         LineWithActionsWidget,
-        OrderedList,
-        templateString
+        OrderedList
 		) {
-        return declare('rft.ui.AccountListView',[OrderedList,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
-            templateString: templateString,
+        return declare('rft.ui.AccountListView',[OrderedList],{
             baseClass: 'rftAccountListView',
-            region: 'center',
+            type: 'account',
 
-            creatorMethod: function(item, hint) {
-            	var node;
-
-            	if (hint == "avatar") {
-            		node = document.createElement("div");
-            		node.className = "dragAvatar";
-            		node.innerHTML = item.title;
-            	} else {
-            		var w = new LineWithActionsWidget({
-            			title: item.title,
-            			'class': "green",
-            			actions: {
-            				"Remove" : {
-            					callback: lang.hitch(this, function() {
-            						this.removeItem(item, w);
-            					}),
-            					properties: {
-            						blockButton: false,
-            						icon: "Delete",
-            						modifiers: "white"
-            					}
-            				}
-            			}
-            		});
-            		w.startup();
-            		node = w.domNode;
-            	}
-            	var fullItem = {
-            		node: node,
-            		data: item,
-            		type: "ListViewItem"
-            	};
-            	return fullItem;
+            _createAvatarNode: function(item){
+                return domConstruct.create("div",{
+                    'class': 'dragAvatar',
+                    innerHTML: item.title
+                });
+            },
+            _createListNode: function(item) {
+        		var w = new LineWithActionsWidget({
+        			title: item.title,
+        			'class': "green",
+        			actions: {
+        				"Remove" : {
+        					callback: lang.hitch(this, 'removeItem', item),
+        					properties: {
+        						blockButton: false,
+        						icon: "Delete",
+        						modifiers: "white"
+        					}
+        				}
+        			}
+        		});
+        		w.startup();
+        		return w.domNode;
         	}
-
-           
-
         });
-});
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/CategoryListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/CategoryListView.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/CategoryListView.js	(revision 384)
@@ -2,61 +2,43 @@
     'dojo/_base/declare',
     'dojo/_base/lang',
-    'dijit/_WidgetBase',
-    'dijit/_TemplatedMixin',
-    'dijit/_WidgetsInTemplateMixin',
-    'dijit/_Container',
     'rft/ui/LineWithActionsWidget',
     'rft/ui/List',
-    'dojo/text!./templates/List.html'
     ],function(
         declare,
         lang,
-        _WidgetBase,
-        _TemplatedMixin,
-        _WidgetsInTemplateMixin,
-        _Container,
         LineWithActionsWidget,
-        List,
-        templateString
+        List
         ) {
-        return declare('rft.ui.CategoryListView',[List,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
-            templateString: templateString,
+        return declare('rft.ui.CategoryListView',[List],{
             baseClass: 'rftLineListView',
-            region: 'center',
 
-            creatorMethod: function(item, hint) {
-                var node;
+            _createAvatarNode: function(item) {
+                var node = document.createElement("div");
+                node.className = "dragAvatar";
+                node.innerHTML = item.title;
+                return node;
+            },
 
-                if (hint == "avatar") {
-                    node = document.createElement("div");
-                    node.className = "dragAvatar";
-                    node.innerHTML = item.title;
-                } else {
-                    var w = new LineWithActionsWidget({
-                        title: item,
-                        'class': "orange",
-                        actions: {
-                            "Remove" : {
-                                callback: lang.hitch(this, function() {
-                                    this.removeItem(item, w);
-                                }),
-                                properties: {
-                                    blockButton: false,
-                                    icon: "Delete",
-                                    modifiers: "white"
-                                }
+            _createListNode: function(item) {
+                var w = new LineWithActionsWidget({
+                    title: item,
+                    'class': "orange",
+                    actions: {
+                        "Remove" : {
+                            callback: lang.hitch(this, function() {
+                                this.removeItem(item, w);
+                            }),
+                            properties: {
+                                blockButton: false,
+                                icon: "Delete",
+                                modifiers: "white"
                             }
                         }
-                    });
-                    w.startup();
-                    node = w.domNode;
-                }
-                var fullItem = {
-                    node: node,
-                    data: item,
-                    type: "ListViewItem"
-                };
-                return fullItem;
+                    }
+                });
+                w.startup();
+                return w.domNode;
             }
+
         });
-});
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/List.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/List.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/List.js	(revision 384)
@@ -2,18 +2,20 @@
     'dojo/_base/declare',
     'dojo/_base/lang',
+    'dojo/dnd/Source',
+    'dijit/_Container',
+    'dijit/_TemplatedMixin',
     'dijit/_WidgetBase',
-    'dijit/_TemplatedMixin',
     'dijit/_WidgetsInTemplateMixin',
-    'dijit/_Container',
-    'rft/ui/LineWithActionsWidget',
+    'dijit/registry',
     'dojo/text!./templates/List.html'
     ],function(
         declare,
         lang,
+        Source,
+        _Container,
+        _TemplatedMixin,
         _WidgetBase,
-        _TemplatedMixin,
         _WidgetsInTemplateMixin,
-        _Container,
-        LineWithActionsWidget,
+        registry,
         templateString
         ){
@@ -22,9 +24,6 @@
             baseClass: 'rftList',
             removeCallback: null,
-            creator: null,
-
-            constructor: function() {
-                lang.mixin(this, arguments);
-            },
+            type: 'text',
+            source: null,
 
             postCreate: function() {
@@ -35,25 +34,53 @@
                 }
 
-                this.source = new dojo.dnd.Source(this.sourceNode, {
-                    isSource: false,
-                    accept: ["LineListViewItem"],
+                this.source = new Source(this.sourceNode, {
+                    accept: [this.type],
                     horizontal: false,
-                    withHandles: false,
-                    selfCopy: false,
-                    selfAccept: true,
-                    delay: 0,
                     singular: true,
-                    creator: lang.hitch(this, this.creatorMethod)
-                })
+                    creator: lang.hitch(this, this._createNode)
+                });
             },
 
-            removeItem: function(item, widget) {
-                widget.destroy();
-                if(this.removeCallback)
-                    this.removeCallback(item);
+            _createNode: function(item, hint) {
+                var node = hint === "avatar" ?
+                        this._createAvatarNode(item) : this._createListNode(item);
+                return {
+                    node: node,
+                    data: item,
+                    type: this.type
+                };
+            },
+            _createListNode: function(item) {},
+            _createAvatarNode: function(item) {},
+
+            appendItem: function(item) {
+                this.source.insertNodes(false,[item]);
             },
 
-            insertItem: function(item) {
-                this.source.insertNodes(false, [item]);
+            getItems: function() {
+                return this.source.getAllNodes()
+                .map(function(node){
+                    return this.source.getItem(node.id).data;
+                },this);
+            },
+
+            deleteItems: function() {
+                this.source.getAllNodes()
+                .forEach(function(node){
+                    registry.byNode(node).destroy();
+                });
+                this.source.sync();
+            },
+
+            removeItem: function(item){
+                this.source.getAllNodes()
+                .filter(lang.hitch(this,function(node){
+                    return this.source.getItem(node.id).data === item;
+                }))
+                .forEach(lang.hitch(this,function(node){
+                    registry.byNode(node).destroy();
+                    this.removeCallback && this.removeCallback(item);
+                }));
+                this.source.sync();
             }
 
Index: Dev/branches/rest-dojo-ui/client/rft/ui/MultipleChoiceListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/MultipleChoiceListView.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/MultipleChoiceListView.js	(revision 384)
@@ -2,61 +2,42 @@
     'dojo/_base/declare',
     'dojo/_base/lang',
-    'dijit/_WidgetBase',
-    'dijit/_TemplatedMixin',
-    'dijit/_WidgetsInTemplateMixin',
-    'dijit/_Container',
+    'dojo/dom-construct',
     'rft/ui/LineWithActionsWidget',
-    'rft/ui/OrderedList',
-    'dojo/text!./templates/AccountListView.html'
+    'rft/ui/OrderedList'
     ],function(
         declare,
         lang,
-        _WidgetBase,
-        _TemplatedMixin,
-        _WidgetsInTemplateMixin,
-        _Container,
+        domConstruct,
         LineWithActionsWidget,
-        OrderedList,
-        templateString
+        OrderedList
         ) {
-        return declare('rft.ui.MultipleChoiceListView',[OrderedList,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
-            templateString: templateString,
+        return declare('rft.ui.MultipleChoiceListView',[OrderedList],{
             baseClass: 'rftMultipleChoiceListView',
-            region: 'center',
+            type: 'multipleChoiceOption',
 
-            creatorMethod: function(item, hint) {
-                var node;
-
-                if (hint == "avatar") {
-                    node = document.createElement("div");
-                    node.className = "dragAvatar";
-                    node.innerHTML = item.title;
-                } else {
-                    var w = new LineWithActionsWidget({
-                        title: item.title,
-                        'class': "orange",
-                        actions: {
-                            "Remove" : {
-                                callback: lang.hitch(this, function() {
-                                    this.removeItem(item, w);
-                                }),
-                                properties: {
-                                    blockButton: false,
-                                    icon: "Delete",
-                                    modifiers: "white"
-                                }
+            _createAvatarNode: function(item){
+                return domConstruct.create("div",{
+                    'class': 'dragAvatar',
+                    innerHTML: item.title
+                });
+            },
+            _createListNode: function(item) {
+                var w = new LineWithActionsWidget({
+                    title: item.title,
+                    'class': "orange",
+                    actions: {
+                        "Remove" : {
+        					callback: lang.hitch(this, 'removeItem', item),
+                            properties: {
+                                blockButton: false,
+                                icon: "Delete",
+                                modifiers: "white"
                             }
                         }
-                    });
-                    w.startup();
-                    node = w.domNode;
-                }
-                var fullItem = {
-                    node: node,
-                    data: item,
-                    type: "ListViewItem"
-                };
-                return fullItem;
+                    }
+                });
+                w.startup();
+                return w.domNode;
             }
         });
-});
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/OrderedDndList.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/OrderedDndList.js	(revision 383)
+++ 	(revision )
@@ -1,166 +1,0 @@
-define([
-    'dojo/_base/declare',
-    'dojo/_base/lang',
-    'dojo/dnd/Source',
-    'dojo/dom-construct',
-    'dijit/_Container',
-    'dijit/_TemplatedMixin',
-    'dijit/_WidgetBase',
-    'dijit/_WidgetsInTemplateMixin',
-    'dijit/form/Button',
-    'rft/ui/LineWithActionsWidget',
-    'dojo/text!./templates/OrderedDndList.html'
-    ],function(
-        declare,
-        lang,
-        Source,
-        domConstruct,
-        _Container,
-        _TemplatedMixin,
-        _WidgetBase,
-        _WidgetsInTemplateMixin,
-        Button,
-        LineWithActionsWidget,
-        templateString
-    ){
-        return declare('rft.ui.OrderedDndList',[_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
-            templateString: templateString,
-            baseClass: 'rftSurveyListView',
-            type: 'text',
-            source: null,
-
-            postCreate: function() {
-                if (this.title) {
-                    this.titleNode.innerHTML = this.title;
-                } else {
-                    this.domNode.removeChild(this.titleNode);
-                }
-
-                this.source = new Source(this.sourceNode, {
-                    accept: [this.type],
-                    horizontal: false,
-                    singular: true,
-                    creator: lang.hitch(this, this._createQuestionDndItem)
-                });
-
-                new Button({
-                    label: "Move up",
-                    showLabel: false,
-                    iconClass: "rftIcon rftIconFullArrowUp",
-                    baseClass: "rftBlockButton",
-                    'class': "trans",
-                    onClick: lang.hitch(this, function() {
-                        this._moveSelectedItem("up");
-                    })
-                }, this.btnListMoveUp);
-
-                new Button({
-                    label: "Move down",
-                    showLabel: false,
-                    iconClass: "rftIcon rftIconFullArrowDown",
-                    baseClass: "rftBlockButton",
-                    'class': "trans",
-                    onClick: lang.hitch(this, function() {
-                        this._moveSelectedItem("down");
-                    })
-                }, this.btnListMoveDown);
-            },
-            _createQuestionDndItem: function(item, hint) {
-                var node;
-
-                if (hint == "avatar") {
-                    node = domConstruct.create("div",{
-                        'class': 'dragAvatar',
-                        innerHTML: item.title
-                    });
-                } else {
-                    var w = new LineWithActionsWidget({
-                        title: item.title,
-                        'class': "inheritBgColor",
-                        actions: {
-                            "Remove" : {
-                                // w not bound in hitch, because it's
-                                // not initialized when hitch is called.
-                                callback: lang.hitch(this, function(){
-                                    this._removeItem(w);
-                                }),
-                                properties: {
-                                    blockButton: false,
-                                    icon: "Delete",
-                                    modifiers: "white",
-                                    label: "Remove"
-                                }
-                            },
-                            "Info" : {
-                                callback: function(){ item.description && alert(item.description); },
-                                properties: {
-                                    blockButton: false,
-                                    icon: "Inspect",
-                                    modifiers: "white",
-                                    label: "Show info"
-                                }
-                            }
-                        }
-                    });
-                    w.startup();
-                    node = w.domNode;
-                }
-                return {
-                    node: node,
-                    data: item,
-                    type: "question"
-                };
-            },
-            _moveSelectedItem: function(dir) {
-                var node = this.source.getSelectedNodes()[0];
-                if (node) {
-                    if (dir == "up") {
-                        if (node.previousSibling) {
-                            return node.parentNode.insertBefore(node, node.previousSibling);
-                        } else {
-                            return false;
-                        }
-
-                    } else if (dir == "down") {
-                        if (node.nextSibling) {
-                            return node.parentNode.insertBefore(node.nextSibling, node);
-                        } else {
-                            return false;
-                        }
-                    } else {
-                        throw "Invalid move direction passed!";
-                    }
-                } else {
-                    return false;
-                }
-            },
-            insertItem: function(item) {
-                var anchor = this.source.getSelectedNodes()[0];
-                if (anchor) {
-                    this.source.insertNodes(false,[item], false, anchor);
-                } else {
-                    this.appendItem(item);
-                }
-            },
-            appendItem: function(item) {
-                this.source.insertNodes(false,[item]);
-            },
-            getItems: function() {
-                return this.source.getAllNodes()
-                .map(function(node){
-                    return this.source.getItem(node.id).data;
-                },this);
-            },
-            deleteItems: function() {
-                this.source.getAllNodes()
-                .forEach(function(node){
-                    node.destroy();
-                });
-                this.source.sync();
-            },
-            _removeItem: function(widget){
-                widget.destroy();
-                this.source.sync();
-            }
-        });
-    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/OrderedList.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/OrderedList.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/OrderedList.js	(revision 384)
@@ -2,8 +2,5 @@
     'dojo/_base/declare',
     'dojo/_base/lang',
-    'dijit/_WidgetBase',
-    'dijit/_TemplatedMixin',
-    'dijit/_WidgetsInTemplateMixin',
-    'dijit/_Container',
+    'dijit/form/Button',
     'rft/ui/List',
     'dojo/text!./templates/OrderedList.html'
@@ -11,36 +8,16 @@
         declare,
         lang,
-        _WidgetBase,
-        _TemplatedMixin,
-        _WidgetsInTemplateMixin,
-        _Container,
+        Button,
         List,
         templateString
         ){
-        return declare('rft.ui.OrderedList',[_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container,List],{
+        return declare('rft.ui.OrderedList',[List],{
             templateString: templateString,
             baseClass: 'rftLineListView',
 
             postCreate: function() {
-                if (this.title) {
-                    this.titleNode.innerHTML = this.title;
-                } else {
-                    this.domNode.removeChild(this.titleNode);
-                }
+                this.inherited(arguments);
 
-                this.source = new dojo.dnd.Source(this.sourceNode, {
-                    isSource: true,
-                    accept: ["LineListViewItem"],
-                    horizontal: false,
-                    withHandles: false,
-                    copyOnly: false,
-                    selfCopy: false,
-                    selfAccept: true,
-                    delay: 0,
-                    singular: true,
-                    creator: lang.hitch(this, this.creatorMethod)
-                });
-
-                new dijit.form.Button({
+                new Button({
                     label: "Move up",
                     showLabel: false,
@@ -49,9 +26,9 @@
                     'class': "trans",
                     onClick: lang.hitch(this, function() {
-                        this.moveItem("up");
+                        this._moveSelectedItem("up");
                     })
-                }, this.btnListMoveUp);
+                }, this.btnListMoveUp).startup();
 
-                new dijit.form.Button({
+                new Button({
                     label: "Move down",
                     showLabel: false,
@@ -60,10 +37,10 @@
                     'class': "trans",
                     onClick: lang.hitch(this, function() {
-                        this.moveItem("down");
+                        this._moveSelectedItem("down");
                     })
-                }, this.btnListMoveDown); 
+                }, this.btnListMoveDown).startup();
             },
 
-            moveItem: function(dir) {
+            _moveSelectedItem: function(dir) {
                 var node = this.source.getSelectedNodes()[0];
                 if (node) {
@@ -92,15 +69,10 @@
                 var anchor = this.source.getSelectedNodes()[0];
                 if (anchor) {
-                    this.source.insertNodes(false, [item], false, anchor);
+                    this.source.insertNodes(false,[item], false, anchor);
                 } else {
-                    this.source.insertNodes(false, [item]);
+                    this.appendItem(item);
                 }
-            },
-            getItems: function() {
-                return this.source.getAllNodes()
-                .map(function(node){
-                    return this.source.getItem(node.id).data;
-                },this);
-            },
+            }
+
         });
     });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js	(revision 384)
@@ -84,9 +84,8 @@
 			_setupListView: function() {
 				this._list = new CategoryListView( {
-					controller: this,
-					removeCallback: lang.hitch(this, this._removeCategory),
+					removeCallback: lang.hitch(this, this._removeCategory)
 				}).placeAt(this.listNode);
-				for (category in this._categories) {
-					this._list.insertItem(this._categories[category]);
+				for (var category in this._categories) {
+					this._list.appendItem(this._categories[category]);
 				}	
 				this._list.startup();
@@ -124,5 +123,5 @@
 			_addCategory: function(item) {
 				this._categories.push(item);
-				this._list.insertItem(item);
+				this._list.appendItem(item);
 			},
 			_removeCategory: function(item) {
Index: Dev/branches/rest-dojo-ui/client/rft/ui/QuestionListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/QuestionListView.js	(revision 384)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/QuestionListView.js	(revision 384)
@@ -0,0 +1,53 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dom-construct',
+    'rft/ui/LineWithActionsWidget',
+    'rft/ui/OrderedList'
+    ],function(
+        declare,
+        lang,
+        domConstruct,
+        LineWithActionsWidget,
+        OrderedList
+    ){
+        return declare('rft.ui.QuestionListView',[OrderedList],{
+            baseClass: 'rftSurveyListView',
+            type: 'question',
+
+            _createAvatarNode: function(item){
+                return domConstruct.create("div",{
+                    'class': 'dragAvatar',
+                    innerHTML: item.title
+                });
+            },
+            _createListNode: function(item) {
+                var w = new LineWithActionsWidget({
+                    title: item.title,
+                    'class': "inheritBgColor",
+                    actions: {
+                        "Remove" : {
+        					callback: lang.hitch(this, 'removeItem', item),
+                            properties: {
+                                blockButton: false,
+                                icon: "Delete",
+                                modifiers: "white",
+                                label: "Remove"
+                            }
+                        },
+                        "Info" : {
+                            callback: function(){ item.description && alert(item.description); },
+                            properties: {
+                                blockButton: false,
+                                icon: "Inspect",
+                                modifiers: "white",
+                                label: "Show info"
+                            }
+                        }
+                    }
+                });
+                w.startup();
+                return w.domNode;
+            }
+        });
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/TabbedQuestionBrowser.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/TabbedQuestionBrowser.js	(revision 383)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/TabbedQuestionBrowser.js	(revision 384)
@@ -77,5 +77,4 @@
                     };
                     this._fillTopicSelector(topic,category);
-                    w.on('include',lang.hitch(this,this.onSelect));
                 }
             },
@@ -107,8 +106,11 @@
                     }
                 } else {
-                    console.warn('Busycount <= 0 when _done is called.');
+                    console.warn('_done() was called more times than _busy().');
                 }
             },
-            onSelect: function(question) {}
+            destroy: function() {
+                this._busyWidget.destroyRecursive();
+                this.inherited(arguments);
+            }
         });
     });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/templates/AccountListView.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/templates/AccountListView.html	(revision 383)
+++ 	(revision )
@@ -1,9 +1,0 @@
-<div>
-	<h3 data-dojo-attach-point="titleNode"></h3>
-	<div data-dojo-attach-point="sourceNode" id="source" class="${baseClass}Content"></div>
-	<div data-dojo-attach-point="buttonsNode" class="floatRight">
-		<span>Move selected: </span>
-		<button data-dojo-attach-point="btnListMoveUp" ></button>
-		<button data-dojo-attach-point="btnListMoveDown"></button>
-	</div>
-</div>
Index: Dev/branches/rest-dojo-ui/client/rft/ui/templates/OrderedDndList.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/templates/OrderedDndList.html	(revision 383)
+++ 	(revision )
@@ -1,11 +1,0 @@
-<div>
-	<h3 data-dojo-attach-point="titleNode"></h3>
-	<div data-dojo-attach-point="sourceNode" id="DERPDERP" class="${baseClass}Content"></div>
-	<div data-dojo-attach-point="buttonsNode" class="floatRight">
-		<span>Move selected: </span>
-		<button data-dojo-attach-point="btnListMoveUp" ></button>
-		<button data-dojo-attach-point="btnListMoveDown"></button>
-	</div>
-	<div data-dojo-attach-point="containerNode">
-	</div>
-</div>
Index: Dev/branches/rest-dojo-ui/docs/jsonformat.txt
===================================================================
--- Dev/branches/rest-dojo-ui/docs/jsonformat.txt	(revision 384)
+++ Dev/branches/rest-dojo-ui/docs/jsonformat.txt	(revision 384)
@@ -0,0 +1,37 @@
+sessions
+========
+{
+    type: 'SessionTemplate',
+    title: '',
+    description: '',
+    plannedDate: '', /* ISO UTC datetime */
+    accounts: [ /* Account ids */ ]
+}
+
+{
+    type: 'SessionInstance',
+    title: '',
+    description: '',
+    publishedDate: '', /* ISO UTC datetime */
+    accounts: [ /* Account ids */ ]
+}
+
+survey
+======
+{
+    type: 'Survey'
+    title: '',
+    description: '',
+    questions: [ /* Question ids */ ]
+}
+
+question
+========
+{
+    type: 'Question'
+    title: '',
+    description: '',
+    topic: '',
+    categories: [],
+    content: [{ type:'contentTypeId', /* custom content element fields */ } /* and more ... */]
+}
