Index: Dev/branches/rest-dojo-ui/client/rft/pages/question.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/question.js	(revision 388)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/question.js	(revision 389)
@@ -32,11 +32,10 @@
             },
             _refresh: function () {
-                this._toolkit.loadQuestion(this.question);
-                this._preview.insertObjects(this.question.content || []);
+                this._toolkit.set('value',this.question);
+                this._preview.appendItems(this.question.content || []);
             },
             _onSave: function() {
-                lang.mixin(this.question, this._toolkit.propertiesForm.get('value'));
-                this.question.categories = this._toolkit._categories; 
-                this.question.content = this._preview.getContent();
+                lang.mixin(this.question, this._toolkit.get('value'));
+                this.question.content = this._preview.getItems();
                 store.put(this.question)
                 .then(function() {
Index: Dev/branches/rest-dojo-ui/client/rft/pages/session.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/session.js	(revision 388)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/session.js	(revision 389)
@@ -5,10 +5,10 @@
     'dojo/_base/event',
     'dojo/_base/Deferred',
-    'rft/elastic/ElasticSearchFilteringSelect',
-    'rft/elastic/ElasticReadStore',
-    'rft/store',
-    'rft/ui/_Page',
-    'rft/content',
-    'rft/ui/AccountListView'
+    '../content',
+    '../store',
+    '../elastic/ElasticSearchFilteringSelect',
+    '../elastic/ElasticReadStore',
+    '../ui/_Page',
+    '../ui/lists/AccountListView'
     ],
     function(array,declare,lang,event,Deferred,ElasticSearchFilteringSelect,ElasticReadStore,store,_Page,content,AccountListView){
Index: Dev/branches/rest-dojo-ui/client/rft/pages/survey.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/survey.js	(revision 388)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/survey.js	(revision 389)
@@ -5,9 +5,9 @@
     'dojo/_base/event',
     'dojo/_base/lang',
-    'rft/content',
-    'rft/store',
-    'rft/ui/_Page',
-    'rft/ui/QuestionListView',
-    'rft/ui/TabbedQuestionBrowser'
+    '../content',
+    '../store',
+    '../ui/_Page',
+    '../ui/lists/QuestionListView',
+    '../ui/TabbedQuestionBrowser'
     ],
     function(array,declare,Deferred,event,lang,content,store,_Page,
Index: Dev/branches/rest-dojo-ui/client/rft/run.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 388)
+++ Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 389)
@@ -31,9 +31,8 @@
     'dijit/form/Textarea',
     'dijit/form/TextBox',
+
     'dojox/grid/DataGrid',
-    'dojox/widget/TitleGroup',
-    'rft/ui/AccountListView',
+
     'rft/ui/LineWithActionsWidget',
-    'rft/ui/List',
     'rft/ui/MainMenu',
     'rft/ui/MenuBarLink',
@@ -41,8 +40,10 @@
     'rft/ui/Notifications',
     'rft/ui/ObjectBox',
-    'rft/ui/OrderedList',
     'rft/ui/QuestionWidget',
     'rft/ui/Selector',
     'rft/ui/TitleGroup',
+    'rft/ui/lists/AccountListView',
+    'rft/ui/lists/List',
+    'rft/ui/lists/OrderedList',
 
     // pages -> load dynamically?
Index: Dev/branches/rest-dojo-ui/client/rft/ui/AccordionList.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/AccordionList.js	(revision 388)
+++ 	(revision )
@@ -1,109 +1,0 @@
-define(['dojo/_base/declare','dojo/_base/lang','dojo/_base/array',
-    'dojo/_base/Deferred','dojo/dom-construct','dijit/_WidgetBase',
-    'dijit/_TemplatedMixin','dijit/_WidgetsInTemplateMixin','dijit/TitlePane',
-    'rft/ui/LineWithActionsWidget','dojo/text!./templates/AccordionList.html'],
-    function(declare,lang,array,
-        Deferred,domConstruct,_WidgetBase,
-        _TemplatedMixin,_WidgetsInTemplateMixin,TitlePane,
-        LineWithActionsWidget,template){
-        return declare('rft.ui.AccordionList',[_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin],{
-            templateString: template,
-            idProperty: null,
-            categoryProperty: null,
-            titleProperty: "test",
-            actions: null,
-            _widgets: null,
-            constructor: function() {
-                this._widgets = {};
-            },
-            setItems: function(items) {
-                var obsoleteWidgets = array.filter(this.widgets,function(item){
-                    return array.indexOf(items,item) < 0;
-                });
-                array.forEach(obsoleteWidgets,function(widget){
-                    widget.destroy();
-                });
-                array.forEach(this._widgets,domConstruct.destroy); // get everything out of the dom
-                array.forEach(items,lang.hitch(this,"_addItem"));
-                this._cleanupEmptyContainers();
-            },
-            addItems: function(items) {
-                array.forEach(items,lang.hitch(this,"_addItem"));
-                this._cleanupEmptyContainers();
-            },
-            addItem: function(item) {
-                this._addItem(item);
-                this._cleanupEmptyContainers();
-            },
-            _addItem: function(item) {
-                var widget = this._getWidgetForItem(item);
-                var container = this._getContainerForItem(item);
-                widget.placeAt(container.containerNode);
-            },
-            removeItem: function(item) {
-                var id = this._getItemProperty(this.idProperty,item);
-                var widget = this._getWidgetForItem(item);
-                widget && widget.destroy();
-                delete this._widgets[id];
-            },
-            _getWidgetForItem: function(item) {
-                var id = this._getItemProperty(this.idProperty,item);
-                var widget = this._widgets[id];
-                if ( !widget ) {
-                    widget = new LineWithActionsWidget({
-                        title: this._getItemProperty(this.titleProperty,item),
-                        userObject: item,
-                        actions: this.actions
-                    });
-                    widget.startup();
-                    this._widgets[id] = widget;
-                } else {
-                    widget.title = this._getItemProperty(this.titleProperty,item);
-                    widget.userObject = item;
-                    widget.refresh();
-                }
-                return widget;
-            },
-            _getContainerForItem: function(item) {
-                var category = this._getItemProperty(this.categoryProperty,item) || 'Unsorted';
-                var widgets = this.accordion.getChildren();
-                var containerWidget = null;
-                var placeNode = this.accordion.domNode;
-                var placePos = 'last';
-                array.some(widgets,lang.hitch(this,function(widget) {
-                    if ( widget.title == category ) {
-                        containerWidget = widget;
-                        return true;
-                    } else if ( widget.title > category  ) {
-                        placeNode = widget.domNode;
-                        placePos = "before";
-                        return true;
-                    }
-                    return false;
-                }));
-                if ( !containerWidget ) {
-                    containerWidget = new TitlePane({
-                        title:category
-                    });
-                    containerWidget.startup();
-                    domConstruct.place(containerWidget.domNode,placeNode,placePos);
-                }
-                return containerWidget;
-            },
-            _cleanupEmptyContainers: function() {
-                var widgets = this.accordion.getChildren();
-                array.forEach(widgets,lang.hitch(this,function(widget){
-                    if ( !widget.getChildren().length ) {
-                        this.accordion.removeChild(widget).destroy();
-                    }
-                }));
-            },
-            _getItemProperty: function(property,item) {
-                if ( lang.isFunction(property) ) {
-                    return property(item);
-                } else {
-                    return item[property];
-                }
-            }
-        });
-    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/AccountListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/AccountListView.js	(revision 388)
+++ 	(revision )
@@ -1,43 +1,0 @@
-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.AccountListView',[OrderedList],{
-            baseClass: 'rftAccountListView',
-            type: 'account',
-
-            _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 388)
+++ 	(revision )
@@ -1,44 +1,0 @@
-define([
-    'dojo/_base/declare',
-    'dojo/_base/lang',
-    'rft/ui/LineWithActionsWidget',
-    'rft/ui/List',
-    ],function(
-        declare,
-        lang,
-        LineWithActionsWidget,
-        List
-        ) {
-        return declare('rft.ui.CategoryListView',[List],{
-            baseClass: 'rftLineListView',
-
-            _createAvatarNode: function(item) {
-                var node = document.createElement("div");
-                node.className = "dragAvatar";
-                node.innerHTML = item.title;
-                return node;
-            },
-
-            _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();
-                return w.domNode;
-            }
-
-        });
-    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/ContentWidgetFactory.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/ContentWidgetFactory.js	(revision 388)
+++ 	(revision )
@@ -1,183 +1,0 @@
-define([
-    'dojo/_base/declare',
-    'dojo/_base/lang', 
-    'dijit/form/NumberSpinner',
-    'dijit/form/Textarea',
-    'dijit/form/TextBox',
-    'dijit/layout/StackContainer',
-    'dojox/form/CheckedMultiSelect',
-    'dojox/layout/TableContainer'
-    ],function(declare, lang, NumberSpinner, Textarea, TextBox, StackContainer, CheckedMultiSelect, TableContainer) {
-        var factory = declare('rft.ui.ContentWidgetFactory', [], {
-            /* No default type, all should be valid */
-            createWidget: function(/*Object*/ content) {
-                // options: Object
-                //            type: "header", "text", textinput, etc.
-                //            contents: "text"
-                //            disabled: bool
-                return this['create'+content.type+'Widget'](content);
-            },
-            createHeaderWidget: function(options) {
-                var headerWidget = new HeaderItem();
-                headerWidget.setObject(options);
-                return headerWidget;
-            },
-            createTextWidget: function(options) {
-                var textWidget = new TextItem();
-                textWidget.setObject(options);
-                return textWidget;
-            },
-            createFreeTextInputWidget: function(options) {
-                return new FreeTextInput();
-            },
-            createIntegerInputWidget: function(options) {
-                var integerWidget = new IntegerInput();
-                integerWidget.setObject(options);
-                return integerWidget;
-            },
-            createMultipleChoiceInputWidget: function(options) {
-                var mcWidget = new MultipleChoiceInput();
-                mcWidget.setObject(options);
-                return mcWidget;
-            }
-        });
-
-        /* Contents */
-        var HeaderItem = declare(TextBox, {
-            getObject: function() {
-                return { type : 'Header',
-                         contents: this.get('value'),
-                         disabled: this.get('disabled')
-                };
-            },
-            setObject: function(object) {
-                this.set('value', object.contents);
-                if (object.disabled) {
-                    this.set('disabled', true);
-                }
-            }
-        });
-
-        var TextItem = declare(Textarea, {
-            getObject: function() {
-                return { type: 'Text',
-                         contents: this.get('value'),
-                         disabled: this.get('disabled')
-                };
-            },
-            setObject: function(object) {
-                this.set('value', object.contents);
-                if (object.disabled) {
-                    this.set('disabled', true);
-                }
-            }    
-        });
-
-        /* Inputs */
-        var FreeTextInput = declare(Textarea, {
-            getObject: function() {
-                return { type: 'FreeTextInput' };
-            }
-        });
-
-        //Use CheckedMultiSelect
-        var MultipleChoiceInput = declare(StackContainer, {
-            _multiSelect: null,
-            postCreate: function() {
-                this.inherited(arguments);
-                this._multiSelect = new CheckedMultiSelect();
-                this._multiSelect.addOption({ label: "Hurr durr", value: 1 });
-                this._multiSelect.addOption({ label: "This is a choice", value: 1 });
-                this._multiSelect.addOption({ label: "This too", value: 1 });
-                this._multiSelect.addOption({ label: "So because there are more", value: 1 });
-                this._multiSelect.addOption({ label: "This must be multiple choice.", value: 1 });
-                this.addChild(this._multiSelect);
-            },
-
-            setObject: function() {
-                return;
-            },
-
-            edit: function() {
-                return;
-            }
-
-        });
-
-        var IntegerInput = declare(StackContainer, {
-            _numberSpinner:  null,
-            _simpleTable: null,
-            _editWidgets: null,
-            _editTable: null,
-            postCreate: function() {
-                this.inherited(arguments);
-                this._numberSpinner = new NumberSpinner( { title: "Answer", value: 0, constraints: { min: -100, max: 100 } });    
-                this._simpleTable = new TableContainer({ cols: 1, customClass: "labelsAndValues", labelWidth : 150} );
-                this._simpleTable.addChild(this._numberSpinner);
-                this._editTable = new TableContainer({ cols: 1, customClass: "labelsAndValues"} );
-                this._simpleTable.startup();
-                this.addChild(this._simpleTable);
-            },
-            edit: function() {
-                this.removeChild(this._simpleTable);
-                this.addChild(this._editTable);
-            },
-            save: function () {
-                for (var widget in this._editWidgets) {
-                    var w = this._editWidgets[widget];
-                    if (w.value) {
-                        if (w.constraint)
-                            this._numberSpinner.constraints[w.field] = w.value;
-                        else 
-                            this._numberSpinner.set(w.field, w.value);
-                    }
-                }
-                this.removeChild(this._editTable);
-                this.addChild(this._simpleTable);
-                this._simpleTable.layout();
-            },
-            setObject: function(object) {
-                if(object.contents) {
-                    lang.mixin(this._numberSpinner, object.contents);
-                    this._setupEditWidgets(object.contents);
-                }
-                else {
-                    //Create widgets with default values
-                    this._setupEditWidgets(this.getObject().contents);
-                }
-            },
-            _setupEditWidgets: function(contents) {
-                //Set up widgets which should appear once edit is pressed.
-                this._editWidgets = [];
-                this._editWidgets.push(new NumberSpinner( { field: "value", title: "Default value" }))
-                this._editWidgets.push(new NumberSpinner( { field: "smallDelta", title: "Increment size" }));
-                this._editWidgets.push(new NumberSpinner( { constraint: true, field: "max", title: "Maximum value" }));
-                this._editWidgets.push(new NumberSpinner( { constraint: true, field: "min", title: "Minimum value" }));
-                this._editWidgets.push(new TextBox ( { field: "invalidMessage", title: "Invalid message" }));
-                this._editWidgets.push(new TextBox ( { field: "title", title: "Label" }));
-                for (var widget in this._editWidgets) {
-                    var w = this._editWidgets[widget];
-                    if (w.constraint)
-                        w.set('value', contents.constraints[w.field]);
-                    else
-                        w.set('value', contents[w.field]);
-                    this._editTable.addChild(w);
-                }
-                this._editTable.startup();
-            },
-            getObject: function() {
-                return { 
-                    type: 'IntegerInput',
-                    contents: { 
-                        value: this._numberSpinner.value,
-                        smallDelta: this._numberSpinner.smallDelta,
-                        constraints: this._numberSpinner.constraints,
-                        invalidMessage: this._numberSpinner.invalidMessage,
-                        title: this._numberSpinner.title
-                    }
-                };
-            }
-        });
-
-        return factory;
-    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/List.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/List.js	(revision 388)
+++ 	(revision )
@@ -1,87 +1,0 @@
-define([
-    'dojo/_base/declare',
-    'dojo/_base/lang',
-    'dojo/dnd/Source',
-    'dijit/_Container',
-    'dijit/_TemplatedMixin',
-    'dijit/_WidgetBase',
-    'dijit/_WidgetsInTemplateMixin',
-    'dijit/registry',
-    'dojo/text!./templates/List.html'
-    ],function(
-        declare,
-        lang,
-        Source,
-        _Container,
-        _TemplatedMixin,
-        _WidgetBase,
-        _WidgetsInTemplateMixin,
-        registry,
-        templateString
-        ){
-        return declare('rft.ui.List',[_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
-            templateString: templateString,
-            baseClass: 'rftList',
-            removeCallback: null,
-            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],
-                    singular: true,
-                    creator: lang.hitch(this, this._createNode)
-                });
-            },
-
-            _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]);
-            },
-
-            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 388)
+++ 	(revision )
@@ -1,43 +1,0 @@
-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.MultipleChoiceListView',[OrderedList],{
-            baseClass: 'rftMultipleChoiceListView',
-            type: 'multipleChoiceOption',
-
-            _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();
-                return w.domNode;
-            }
-        });
-    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/OrderedList.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/OrderedList.js	(revision 388)
+++ 	(revision )
@@ -1,78 +1,0 @@
-define([
-    'dojo/_base/declare',
-    'dojo/_base/lang',
-    'dijit/form/Button',
-    'rft/ui/List',
-    'dojo/text!./templates/OrderedList.html'
-    ],function(
-        declare,
-        lang,
-        Button,
-        List,
-        templateString
-        ){
-        return declare('rft.ui.OrderedList',[List],{
-            templateString: templateString,
-            baseClass: 'rftLineListView',
-
-            postCreate: function() {
-                this.inherited(arguments);
-
-                new Button({
-                    label: "Move up",
-                    showLabel: false,
-                    iconClass: "rftIcon rftIconFullArrowUp",
-                    baseClass: "rftBlockButton",
-                    'class': "trans",
-                    onClick: lang.hitch(this, function() {
-                        this._moveSelectedItem("up");
-                    })
-                }, this.btnListMoveUp).startup();
-
-                new Button({
-                    label: "Move down",
-                    showLabel: false,
-                    iconClass: "rftIcon rftIconFullArrowDown",
-                    baseClass: "rftBlockButton",
-                    'class': "trans",
-                    onClick: lang.hitch(this, function() {
-                        this._moveSelectedItem("down");
-                    })
-                }, this.btnListMoveDown).startup();
-            },
-
-            _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);
-                }
-            }
-
-        });
-    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreview.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreview.js	(revision 388)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreview.js	(revision 389)
@@ -2,62 +2,32 @@
     'dojo/_base/declare',
     'dojo/_base/lang',
-    'dojo/dnd/Source',
     'dojo/dom-construct',
-    'dijit/layout/ContentPane',
-    'rft/ui/QuestionEditorPreviewItem',
-    'dojo/text!./templates/QuestionEditorPreview.html'
-    ], function(declare, lang, Source, domConstruct, ContentPane, QuestionEditorPreviewItem, template) {
-        return declare("rft.ui.QuestionEditorPreview", [ContentPane], {
+    'dijit/registry',
+    './QuestionEditorPreviewItem',
+    './lists/OrderedList',
+    ], function(declare, lang, domConstruct, registry, QuestionEditorPreviewItem, OrderedList) {
+        return declare("rft.ui.QuestionEditorPreview", [OrderedList], {
+            baseClass: 'surveyEditorPreview',
+            type: 'questionContent',
 
-            templateString: template,
-            'class': 'surveyEditorPreview',
-            dndSource: null,
-
-            startup: function(){
-                this.inherited(arguments);
-                this.dndSource = new Source(this.domNode, {
-                    accept: ["questionContent"],
-                    skipForm: true,
-                    creator: lang.hitch(this, this._sourceCreatorMethod)
+            _createAvatarNode: function(item) {
+                return domConstruct.create("span",{
+                    innerHTML: item.type || "Dragging!!!"
                 });
-                this.dndSource.startup();
             },
-            _sourceCreatorMethod: function(item, hint){
-                var node;
-                switch(hint){
-                case "avatar":
-                    node = domConstruct.create("span",{
-                        innerHTML: item.type || "Dragging!!!"
-                    });
-                default:
-                    var previewItem = new QuestionEditorPreviewItem({
-                        item: item.content
-                    });
-                    node = previewItem.domNode;
-                }                
-                return {node: node, data: item, type: ["questionContent"]};
+            _createListNode: function(item) {
+                var previewItem = new QuestionEditorPreviewItem({
+                    item: item
+                });
+                previewItem.on('close',lang.hitch(this,'removeItem',item));
+                previewItem.startup();
+                return previewItem.domNode;
             },
-            insertObjects: function(/*Array*/items) {
-                this.dndSource.insertNodes(false, items);
-            },
-            getContent: function() {
-                var content = [];
-                var nodes = this.dndSource.getAllNodes();
-                for (var i = 0; i < nodes.length; i++) {
-                    content.push(this.dndSource.getItem(nodes[i].id).data.getContent());
-                }
-                return content;
-            },
-            getNodeList: function() {
-                return this.dndSource.getAllNodes();
-            },
-            onDropInternal: function() {
-                topic.publish("/QuestionEditor/Preview/MoveItem");
-            },
-            onDropExternal: function() {
-                // This is fired when something from the Toolkit is dropped into the Preview -- add operation.
-                topic.publish("/QuestionEditor/Preview/AddItem");
+            getItems: function() {
+                return this.source.getAllNodes()
+                .map(function(node){
+                    return registry.byNode(node).get('value');
+                },this);
             }
-
         });
     });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js	(revision 388)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js	(revision 389)
@@ -5,16 +5,17 @@
     'dojo/dom-class',
     'dojo/on',
+    'dijit/_Container',
     'dijit/_TemplatedMixin',
     'dijit/_WidgetBase',
     'dijit/_WidgetsInTemplateMixin',
-    'rft/ui/ContentWidgetFactory',
+    './content/ContentWidgetFactory',
     'dojo/text!./templates/QuestionEditorPreviewItem.html',
-    ], function(declare, fx, lang, domClass, on, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, ContentWidgetFactory, template) {
-        return declare("rft.ui.QuestionEditorPreviewItem", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
-
+    ], function(declare, fx, lang, domClass, on, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, ContentWidgetFactory, template) {
+        return declare("rft.ui.QuestionEditorPreviewItem", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
             version: "full",
             templateString: template,
             baseClass: "surveyEditorPreviewItem",
             previousContentHeight: 200,
+            item: null,
             innerWidget: null,
             foldDuration: [250, 250],
@@ -22,29 +23,65 @@
             _editing: false,
 
-            postCreate: function() {
+            startup: function() {
                 this.inherited(arguments);
                 this.foldButtonNode.onClick = lang.hitch(this, this.toggleFold);
-                this.removeButtonNode.onClick = lang.hitch(this, this.removeObject);
+                this.removeButtonNode.onClick = lang.hitch(this, "onClose");
                 this.editButtonNode.onClick = lang.hitch(this, this.toggleEdit);
                 if (this.item) {
-                    this._createInnerWidget();
+                    this._showViewWidget();
                 } else {
-                    throw "No data supplied to create an innerWidget off of!";
+                    throw "No data supplied to create an innerWidget!";
                 }
-
-                on(this.innerWidget, "onSetTitle", function(title) {
-                    this.titleNode.innerHTML = title;
-                });
+            },
+            _destroyInnerWidget: function() {
+                if ( this.innerWidget !== null ) {
+                    this.innerWidget.destroyRecursive();
+                }
+            },
+            _showViewWidget: function() {
+                var factory = new ContentWidgetFactory();
+                this.innerWidget = factory.createViewWidget( this.item );
+                if ( this.innerWidget !== null ) {
+                    this.innerWidget.placeAt(this.containerNode);
+                    this.innerWidget.startup();
+                }
+                this.titleNode.innerHTML = "[preview]";
+            },
+            _showEditWidget: function() {
+                var factory = new ContentWidgetFactory();
+                this.innerWidget = factory.createEditWidget( this.item );
+                if ( this.innerWidget !== null ) {
+                    this.innerWidget.placeAt(this.containerNode);
+                    this.innerWidget.startup();
+                }
+                this.titleNode.innerHTML = "[editing]";
+            },
+            onClose: function() {},
+            _getValueAttr: function(value) {
+                return this.item;
+            },
+            _setValueAttr: function(value) {
+                this.item = value;
+                this._destroyInnerWidget();
+                if ( this._editing ) {
+                    this._showEditWidget();
+                } else {
+                    this._showViewWidget();
+                }
             },
             toggleEdit: function() {
                 if(this._editing) {
+                    if ( this.innerWidget !== null ) {
+                        this.item = this.innerWidget.get('value');
+                    }
+                    this._destroyInnerWidget();
+                    this._showViewWidget();
                     this.editButtonNode.iconNode.className = this.editButtonNode.iconNode.className.replace("rftIconAccept", "rftIconEdit");
                     this.editButtonNode.set("label", "Edit");
-                    this.innerWidget.save();
-                }
-                else {
+                } else {
+                    this._destroyInnerWidget();
+                    this._showEditWidget();
                     this.editButtonNode.iconNode.className = this.editButtonNode.iconNode.className.replace("rftIconEdit", "rftIconAccept");
                     this.editButtonNode.set("label", "Save");
-                    this.innerWidget.edit();
                 }
                 this._editing = !this._editing;
@@ -81,15 +118,4 @@
                     }
                 }
-            },
-            getContent: function() {
-                return this.innerWidget.getObject();
-            },
-            removeObject: function(evt) {
-                this.destroyRecursive();
-            },
-            _createInnerWidget: function() {
-                this.innerWidget = new ContentWidgetFactory().createWidget( this.item );
-                this.innerWidget.placeAt(this.containerNode);
-                this.innerWidget.startup();
             }
 
Index: Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js	(revision 388)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js	(revision 389)
@@ -11,6 +11,6 @@
     'dijit/form/Button',
     'dijit/form/ComboBox',
-    'rft/store',
-    'rft/ui/CategoryListView',
+    '../store',
+    './lists/CategoryListView',
     'dojo/text!./templates/QuestionEditorToolkit.html'
     ], function(declare, lang, Source, domConstruct, Memory, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, Button, ComboBox, store, CategoryListView, template) {
@@ -107,5 +107,5 @@
                 this.inputsSource.insertNodes(false, this._inputsItems);
             },
-            loadQuestion: function(question) {
+            _setValueAttr: function(question) {
                 this.propertiesForm.set('value', question);
                 this._categories = question.categories;
@@ -113,4 +113,9 @@
                 this._setupCategories();
                 this._setupTopic(question.topic);
+            },
+            _getValueAttr: function() {
+                var value = this.propertiesForm.get('value');
+                value.categories = this._categories;
+                return value;
             },
             onCategoryAdd: function() {
@@ -134,5 +139,5 @@
                     node = w.domNode;
                 }
-                return {node: node, data: item, type: ["questionContent"]};
+                return {node: node, data: item.content, type: ["questionContent"]};
             },
             _setupListView: function() {
Index: Dev/branches/rest-dojo-ui/client/rft/ui/QuestionListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/QuestionListView.js	(revision 388)
+++ 	(revision )
@@ -1,53 +1,0 @@
-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/content/ContentWidgetFactory.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js	(revision 389)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js	(revision 389)
@@ -0,0 +1,210 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang', 
+    'dijit/form/NumberSpinner',
+    'dijit/form/Textarea',
+    'dijit/form/TextBox',
+    'dijit/layout/StackContainer',
+    'dojox/form/CheckedMultiSelect',
+    'dojox/layout/TableContainer'
+    ],function(declare, lang, NumberSpinner, Textarea, TextBox, StackContainer, CheckedMultiSelect, TableContainer) {
+        var factory = declare('rft.ui.content.ContentWidgetFactory', [], {
+            /* No default type, all should be valid */
+            createViewWidget: function(/*Object*/options) {
+                // options: Object
+                //            type: "header", "text", textinput, etc.
+                //            other type specific fields
+                var fun = this['create'+options.type+'ViewWidget'];
+                return fun !== undefined ? fun(options) : null;
+            },
+            createEditWidget: function(/*Object*/options) {
+                var fun = this['create'+options.type+'EditWidget'];
+                return fun !== undefined ? fun(options) : null;
+            },
+
+            createHeaderViewWidget: function(options) {
+                return new HeaderViewItem({
+                    options: options
+                });
+            },
+            createHeaderEditWidget: function(options) {
+                return null;
+            }/*,
+
+            createTextViewWidget: function(options) {
+                return new TextViewItem({
+                    options: options
+                });
+            },
+            createTextEditWidget: function(options) {
+                return new TextEditItem({
+                    options: options
+                });
+            },
+
+            createFreeTextViewWidget: function(options) {
+                return new FreeTextViewItem({
+                    options: options
+                });
+            },
+            createFreeTextEditWidget: function(options) {
+                return new FreeTextEditItem({
+                    options: options
+                });
+            },
+
+            createIntegerViewWidget: function(options) {
+                return new IntegerViewItem({
+                    options: options
+                });
+            },
+            createIntegerEditWidget: function(options) {
+                return new IntegerEditItem({
+                    options: options
+                });
+            },
+
+            createMultipleChoiceViewWidget: function(options) {
+                return new MultipleChoiceViewItem({
+                    options: options
+                });
+            },
+            createMultipleChoiceEditWidget: function(options) {
+                return new MultipleChoiceEditItem({
+                    options: options
+                });
+            }*/
+        });
+
+        /* Contents */
+        var HeaderViewItem = declare(TextBox, {
+            _setValueAttr: function(value) {
+            },
+            _getValueAttr: function() {
+                return {};
+            }
+        });
+
+        var TextItem = declare(Textarea, {
+            getObject: function() {
+                return { type: 'Text',
+                         contents: this.get('value'),
+                         disabled: this.get('disabled')
+                };
+            },
+            setObject: function(object) {
+                this.set('value', object.contents);
+                if (object.disabled) {
+                    this.set('disabled', true);
+                }
+            }    
+        });
+
+        /* Inputs */
+        var FreeTextInput = declare(Textarea, {
+            getObject: function() {
+                return { type: 'FreeTextInput' };
+            }
+        });
+
+        //Use CheckedMultiSelect
+        var MultipleChoiceInput = declare(StackContainer, {
+            _multiSelect: null,
+            startup: function() {
+                this.inherited(arguments);
+                this._multiSelect = new CheckedMultiSelect();
+                this._multiSelect.addOption({ label: "Hurr durr", value: 1 });
+                this._multiSelect.addOption({ label: "This is a choice", value: 1 });
+                this._multiSelect.addOption({ label: "This too", value: 1 });
+                this._multiSelect.addOption({ label: "So because there are more", value: 1 });
+                this._multiSelect.addOption({ label: "This must be multiple choice.", value: 1 });
+                this.addChild(this._multiSelect);
+            },
+
+            setObject: function() {
+                return;
+            },
+
+            edit: function() {
+                return;
+            }
+
+        });
+
+        var IntegerInput = declare(StackContainer, {
+            _numberSpinner:  null,
+            _simpleTable: null,
+            _editWidgets: null,
+            _editTable: null,
+            startup: function() {
+                this.inherited(arguments);
+                this._numberSpinner = new NumberSpinner( { title: "Answer", value: 0, constraints: { min: -100, max: 100 } });    
+                this._simpleTable = new TableContainer({ cols: 1, customClass: "labelsAndValues", labelWidth : 150} );
+                this._simpleTable.addChild(this._numberSpinner);
+                this._editTable = new TableContainer({ cols: 1, customClass: "labelsAndValues"} );
+                this._simpleTable.startup();
+                this.addChild(this._simpleTable);
+            },
+            edit: function() {
+                this.removeChild(this._simpleTable);
+                this.addChild(this._editTable);
+            },
+            save: function () {
+                for (var widget in this._editWidgets) {
+                    var w = this._editWidgets[widget];
+                    if (w.value) {
+                        if (w.constraint)
+                            this._numberSpinner.constraints[w.field] = w.value;
+                        else 
+                            this._numberSpinner.set(w.field, w.value);
+                    }
+                }
+                this.removeChild(this._editTable);
+                this.addChild(this._simpleTable);
+                this._simpleTable.layout();
+            },
+            setObject: function(object) {
+                if(object.contents) {
+                    lang.mixin(this._numberSpinner, object.contents);
+                    this._setupEditWidgets(object.contents);
+                }
+                else {
+                    //Create widgets with default values
+                    this._setupEditWidgets(this.getObject().contents);
+                }
+            },
+            _setupEditWidgets: function(contents) {
+                //Set up widgets which should appear once edit is pressed.
+                this._editWidgets = [];
+                this._editWidgets.push(new NumberSpinner( { field: "value", title: "Default value" }))
+                this._editWidgets.push(new NumberSpinner( { field: "smallDelta", title: "Increment size" }));
+                this._editWidgets.push(new NumberSpinner( { constraint: true, field: "max", title: "Maximum value" }));
+                this._editWidgets.push(new NumberSpinner( { constraint: true, field: "min", title: "Minimum value" }));
+                this._editWidgets.push(new TextBox ( { field: "invalidMessage", title: "Invalid message" }));
+                this._editWidgets.push(new TextBox ( { field: "title", title: "Label" }));
+                for (var widget in this._editWidgets) {
+                    var w = this._editWidgets[widget];
+                    if (w.constraint)
+                        w.set('value', contents.constraints[w.field]);
+                    else
+                        w.set('value', contents[w.field]);
+                    this._editTable.addChild(w);
+                }
+                this._editTable.startup();
+            },
+            getObject: function() {
+                return { 
+                    type: 'IntegerInput',
+                    contents: { 
+                        value: this._numberSpinner.value,
+                        smallDelta: this._numberSpinner.smallDelta,
+                        constraints: this._numberSpinner.constraints,
+                        invalidMessage: this._numberSpinner.invalidMessage,
+                        title: this._numberSpinner.title
+                    }
+                };
+            }
+        });
+
+        return factory;
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/lists/AccountListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/lists/AccountListView.js	(revision 389)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/lists/AccountListView.js	(revision 389)
@@ -0,0 +1,43 @@
+define([
+    'dojo/_base/declare',
+   	'dojo/_base/lang',
+    'dojo/dom-construct',
+    '../LineWithActionsWidget',
+    './OrderedList'
+	],function(
+        declare,
+        lang,
+        domConstruct,
+        LineWithActionsWidget,
+        OrderedList
+		) {
+        return declare('rft.ui.lists.AccountListView',[OrderedList],{
+            baseClass: 'rftAccountListView',
+            type: 'account',
+
+            _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/lists/CategoryListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/lists/CategoryListView.js	(revision 389)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/lists/CategoryListView.js	(revision 389)
@@ -0,0 +1,44 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    '../LineWithActionsWidget',
+    './List',
+    ],function(
+        declare,
+        lang,
+        LineWithActionsWidget,
+        List
+        ) {
+        return declare('rft.ui.lists.CategoryListView',[List],{
+            baseClass: 'rftLineListView',
+
+            _createAvatarNode: function(item) {
+                var node = document.createElement("div");
+                node.className = "dragAvatar";
+                node.innerHTML = item.title;
+                return node;
+            },
+
+            _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();
+                return w.domNode;
+            }
+
+        });
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/lists/List.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/lists/List.js	(revision 389)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/lists/List.js	(revision 389)
@@ -0,0 +1,90 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dnd/Source',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetBase',
+    'dijit/_WidgetsInTemplateMixin',
+    'dijit/registry',
+    'dijit/layout/BorderContainer',
+    'dojo/text!./templates/List.html'
+    ],function(
+        declare,
+        lang,
+        Source,
+        _TemplatedMixin,
+        _WidgetBase,
+        _WidgetsInTemplateMixin,
+        registry,
+        BorderContainer,
+        templateString
+        ){
+        return declare('rft.ui.lists.List',[BorderContainer,_TemplatedMixin,_WidgetsInTemplateMixin],{
+            templateString: templateString,
+            baseClass: 'rftList',
+            removeCallback: null,
+            type: 'text',
+            source: null,
+
+            startup: function() {
+                this.inherited(arguments);
+
+                if (this.title) {
+                    this.titleNode.innerHTML = this.title;
+                }
+
+                this.source = new Source(this.sourceNode.domNode, {
+                    accept: [this.type],
+                    singular: true,
+                    creator: lang.hitch(this, this._createNode)
+                });
+            },
+
+            _createNode: function(item, hint) {
+                var node = hint === "avatar" ?
+                        this._createAvatarNode(item) : this._createListNode(item);
+                return node && {
+                    node: node,
+                    data: item,
+                    type: this.type
+                };
+            },
+            _createListNode: function(item) {},
+            _createAvatarNode: function(item) {},
+
+            appendItem: function(item) {
+                this.source.insertNodes(false,[item]);
+            },
+            appendItems: function(items) {
+                this.source.insertNodes(false,items);
+            },
+
+            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).destroyRecursive();
+                    this.removeCallback && this.removeCallback(item);
+                }));
+                this.source.sync();
+            }
+
+        });
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/lists/MultipleChoiceListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/lists/MultipleChoiceListView.js	(revision 389)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/lists/MultipleChoiceListView.js	(revision 389)
@@ -0,0 +1,43 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dom-construct',
+    '../LineWithActionsWidget',
+    './OrderedList'
+    ],function(
+        declare,
+        lang,
+        domConstruct,
+        LineWithActionsWidget,
+        OrderedList
+        ) {
+        return declare('rft.ui.lists.MultipleChoiceListView',[OrderedList],{
+            baseClass: 'rftMultipleChoiceListView',
+            type: 'multipleChoiceOption',
+
+            _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();
+                return w.domNode;
+            }
+        });
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/lists/OrderedList.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/lists/OrderedList.js	(revision 389)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/lists/OrderedList.js	(revision 389)
@@ -0,0 +1,78 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dijit/form/Button',
+    './List',
+    'dojo/text!./templates/OrderedList.html'
+    ],function(
+        declare,
+        lang,
+        Button,
+        List,
+        templateString
+        ){
+        return declare('rft.ui.lists.OrderedList',[List],{
+            templateString: templateString,
+            baseClass: 'rftLineListView',
+
+            startup: function() {
+                this.inherited(arguments);
+
+                new Button({
+                    label: "Move up",
+                    showLabel: false,
+                    iconClass: "rftIcon rftIconFullArrowUp",
+                    baseClass: "rftBlockButton",
+                    'class': "trans",
+                    onClick: lang.hitch(this, function() {
+                        this._moveSelectedItem("up");
+                    })
+                }, this.btnListMoveUp).startup();
+
+                new Button({
+                    label: "Move down",
+                    showLabel: false,
+                    iconClass: "rftIcon rftIconFullArrowDown",
+                    baseClass: "rftBlockButton",
+                    'class': "trans",
+                    onClick: lang.hitch(this, function() {
+                        this._moveSelectedItem("down");
+                    })
+                }, this.btnListMoveDown).startup();
+            },
+
+            _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);
+                }
+            }
+
+        });
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/lists/QuestionListView.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/lists/QuestionListView.js	(revision 389)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/lists/QuestionListView.js	(revision 389)
@@ -0,0 +1,53 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dom-construct',
+    '../LineWithActionsWidget',
+    './OrderedList'
+    ],function(
+        declare,
+        lang,
+        domConstruct,
+        LineWithActionsWidget,
+        OrderedList
+    ){
+        return declare('rft.ui.lists.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/lists/templates/List.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/lists/templates/List.html	(revision 389)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/lists/templates/List.html	(revision 389)
@@ -0,0 +1,10 @@
+<div>
+        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'top'">
+	        <h3 data-dojo-attach-point="titleNode"></h3>
+        </div>
+        <div data-dojo-type="dijit.layout.ContentPane"
+             data-dojo-props="region: 'center'"
+             data-dojo-attach-point="sourceNode"
+             class="${baseClass}Content">
+        </div>
+</div>
Index: Dev/branches/rest-dojo-ui/client/rft/ui/lists/templates/OrderedList.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/lists/templates/OrderedList.html	(revision 389)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/lists/templates/OrderedList.html	(revision 389)
@@ -0,0 +1,15 @@
+<div>
+        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'top'">
+	        <h3 data-dojo-attach-point="titleNode"></h3>
+        </div>
+        <div data-dojo-type="dijit.layout.ContentPane"
+             data-dojo-props="region: 'center'"
+             data-dojo-attach-point="sourceNode"
+             class="${baseClass}Content">
+        </div>
+        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'bottom'" data-dojo-attach-point="buttonsNode">
+		    <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/AccordionList.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/templates/AccordionList.html	(revision 388)
+++ 	(revision )
@@ -1,4 +1,0 @@
-<div>
-    <div data-dojo-type="rft.ui.TitleGroup" data-dojo-attach-point="accordion">
-    </div>
-</div>
Index: Dev/branches/rest-dojo-ui/client/rft/ui/templates/List.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/templates/List.html	(revision 388)
+++ 	(revision )
@@ -1,4 +1,0 @@
-<div>
-	<h3 data-dojo-attach-point="titleNode"></h3>
-    <div data-dojo-attach-point="sourceNode" id="source" class="${baseClass}Content"></div>
-</div>
Index: Dev/branches/rest-dojo-ui/client/rft/ui/templates/OrderedList.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/templates/OrderedList.html	(revision 388)
+++ 	(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/QuestionEditorPreview.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorPreview.html	(revision 388)
+++ 	(revision )
@@ -1,2 +1,0 @@
-<div class="surveyEditorPreview">
-</div>
Index: Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorToolkit.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorToolkit.html	(revision 388)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorToolkit.html	(revision 389)
@@ -1,5 +1,5 @@
 <div>
 	<div data-dojo-type="dojox.widget.TitleGroup">
-		<div data-dojo-type="dijit.TitlePane" class="orange" open="true" title="Properties" data-dojo-props="iconClass:'rftIcon rftIconProperties'">
+		<div data-dojo-type="dijit.TitlePane" class="orange" data-dojo-props="open:true" title="Properties" data-dojo-props="iconClass:'rftIcon rftIconProperties'">
             <div data-dojo-type="dijit.form.Form" data-dojo-attach-point="propertiesForm" data-rft-attach-event="onSubmit:onSave">
 				<fieldset class="align">
@@ -17,5 +17,5 @@
 		</div>
 
-		<div data-dojo-type="dijit.TitlePane" open="false" title="Content" data-dojo-props="iconClass:'rftIcon rftIconPlus'">
+		<div data-dojo-type="dijit.TitlePane" title="Content" data-dojo-props="iconClass:'rftIcon rftIconPlus', open:false">
 			<div data-dojo-attach-point="ToolkitContentSourceNode">
 				
@@ -23,5 +23,5 @@
 		</div>
 
-		<div data-dojo-type="dijit.TitlePane" open="false" title="Inputs" data-dojo-props="iconClass:'rftIcon rftIconInput'">
+		<div data-dojo-type="dijit.TitlePane" title="Inputs" data-dojo-props="iconClass:'rftIcon rftIconInput', open:false">
 			<div data-dojo-attach-point="ToolkitInputsSourceNode">
 				
