Index: /Dev/trunk/client/qed/css/forms.less
===================================================================
--- /Dev/trunk/client/qed/css/forms.less	(revision 440)
+++ /Dev/trunk/client/qed/css/forms.less	(revision 441)
@@ -33,4 +33,6 @@
         width: 150px;
         display: inline-block;
+        text-align: right;
+        padding: 1px;
     }
 
@@ -38,4 +40,10 @@
         max-width: 350px;
         display: inline-block;
+        vertical-align: top;
+        padding: 1px;
+
+        &.dijitTextArea {
+            min-height: 5em;
+        }
     }
 
Index: /Dev/trunk/client/qed/css/model/widgets/QuestionEditor.less
===================================================================
--- /Dev/trunk/client/qed/css/model/widgets/QuestionEditor.less	(revision 440)
+++ /Dev/trunk/client/qed/css/model/widgets/QuestionEditor.less	(revision 441)
@@ -3,3 +3,7 @@
         overflow: hidden;
     }
+
+    .surveyEditorPreview {
+        overflow-y: auto;
+    }
 }
Index: /Dev/trunk/client/qed/css/qed.css
===================================================================
--- /Dev/trunk/client/qed/css/qed.css	(revision 440)
+++ /Dev/trunk/client/qed/css/qed.css	(revision 441)
@@ -991,18 +991,27 @@
   width: 150px;
   display: inline-block;
-}
-/* line 37, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/forms.less */
-@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/forms\.less}line{font-family:\0000337}}
+  text-align: right;
+  padding: 1px;
+}
+/* line 39, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/forms.less */
+@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/forms\.less}line{font-family:\0000339}}
 #rft.claro .qedField {
   max-width: 350px;
   display: inline-block;
-}
-/* line 42, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/forms.less */
-@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/forms\.less}line{font-family:\0000342}}
+  vertical-align: top;
+  padding: 1px;
+}
+/* line 45, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/forms.less */
+@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/forms\.less}line{font-family:\0000345}}
+#rft.claro .qedField.dijitTextArea {
+  min-height: 5em;
+}
+/* line 50, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/forms.less */
+@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/forms\.less}line{font-family:\0000350}}
 #rft.claro .qedField.qedFill {
   width: 350px;
 }
-/* line 46, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/forms.less */
-@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/forms\.less}line{font-family:\0000346}}
+/* line 54, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/forms.less */
+@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/forms\.less}line{font-family:\0000354}}
 #rft.claro .qedFieldset {
   margin: 1em 0px;
@@ -1743,4 +1752,9 @@
   overflow: hidden;
 }
+/* line 6, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/model/widgets/QuestionEditor.less */
+@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/model\/widgets\/QuestionEditor\.less}line{font-family:\000036}}
+#rft.claro .surveyEditorPreview {
+  overflow-y: auto;
+}
 /* line 5, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/pages/questions.less */
 @media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/pages\/questions\.less}line{font-family:\000035}}
Index: /Dev/trunk/client/qed/model/widgets/AccountListView.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/AccountListView.js	(revision 440)
+++ /Dev/trunk/client/qed/model/widgets/AccountListView.js	(revision 441)
@@ -1,20 +1,14 @@
 define([
-    'dojo/_base/declare',
-    'dojo/_base/lang',
-    'dojo/dom-construct',
-    '../../widgets/LineWithActionsWidget',
-    '../../widgets/list/OrderedList'
-],function(
-    declare,
-    lang,
-    domConstruct,
-    LineWithActionsWidget,
-    OrderedList
-) {
-    return declare([OrderedList],{
+    "../../widgets/LineWithActionsWidget",
+    "../../widgets/ListWidget",
+    "dojo/_base/declare",
+    "dojo/_base/lang",
+    "dojo/dom-construct"
+], function(LineWithActionsWidget, ListWidget, declare, lang, domConstruct) {
+    return declare([ListWidget],{
         baseClass: 'rftAccountListView',
         type: 'account',
 
-        _createAvatarNode: function(item){
+        createAvatar: function(id, item){
             return domConstruct.create("div",{
                 'class': 'dragAvatar',
@@ -22,6 +16,7 @@
             });
         },
-        _createListNode: function(item) {
+        createListElement: function(id, item) {
             var w = new LineWithActionsWidget({
+                id: id,
                 title: item.title,
                 'class': "green",
@@ -37,5 +32,5 @@
             });
             w.startup();
-            return w.domNode;
+            return w;
         }
     });
Index: /Dev/trunk/client/qed/model/widgets/CategoryListView.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/CategoryListView.js	(revision 440)
+++ /Dev/trunk/client/qed/model/widgets/CategoryListView.js	(revision 441)
@@ -1,13 +1,14 @@
 define([
-    'dojo/_base/declare',
-    'dojo/_base/lang',
-    'dojo/dom-construct',
-    '../../widgets/LineWithActionsWidget',
-    '../../widgets/list/List'
-],function(declare, lang, domConstruct, LineWithActionsWidget, List) {
-    return declare([List],{
+    "../../widgets/LineWithActionsWidget",
+    "../../widgets/ListWidget",
+    "dojo/_base/declare",
+    "dojo/_base/lang",
+    "dojo/dom-construct"
+], function(LineWithActionsWidget, ListWidget, declare, lang, domConstruct) {
+    return declare([ListWidget],{
         baseClass: 'rftLineListView',
+        type: 'category',
 
-        _createAvatarNode: function(item) {
+        createAvatar: function(id, item) {
             var node = domConstruct.create("div",{
                 className: "dragAvatar",
@@ -17,13 +18,12 @@
         },
 
-        _createListNode: function(item) {
+        createListElement: function(id, item) {
             var w = new LineWithActionsWidget({
+                id: id,
                 title: item,
                 'class': "orange",
                 actions: {
                     "Remove" : {
-                        callback: lang.hitch(this, function() {
-                            this.removeItem(item, w);
-                        }),
+                        callback: lang.hitch(this, 'removeItem', id),
                         properties: {
                             blockButton: false,
@@ -34,5 +34,5 @@
             });
             w.startup();
-            return w.domNode;
+            return w;
         }
 
Index: /Dev/trunk/client/qed/model/widgets/QuestionEditorPreview.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/QuestionEditorPreview.js	(revision 440)
+++ /Dev/trunk/client/qed/model/widgets/QuestionEditorPreview.js	(revision 441)
@@ -1,36 +1,30 @@
 define([
-    'dojo/_base/array',
-    'dojo/_base/declare',
-    'dojo/_base/lang',
-    'dojo/dom-construct',
-    'dijit/registry',
-    './QuestionEditorPreviewItem',
-    '../../widgets/list/OrderedList'
-], function(array, declare, lang, domConstruct, registry, QuestionEditorPreviewItem, OrderedList) {
-    return declare([OrderedList], {
+    "../../widgets/ListWidget",
+    "./QuestionEditorPreviewItem",
+    "dijit/registry",
+    "dojo/_base/array",
+    "dojo/_base/declare",
+    "dojo/_base/lang",
+    "dojo/dom-construct"
+], function(ListWidget, QuestionEditorPreviewItem, registry, array, declare, lang, domConstruct) {
+    return declare([ListWidget], {
         baseClass: 'surveyEditorPreview',
         type: 'questionContent',
         withHandles: true,
 
-        _createAvatarNode: function(item) {
-            return domConstruct.create("span",{
-                innerHTML: item.type || "Dragging!!!"
+        createAvatar: function(id, item) {
+            return domConstruct.create("div",{
+                innerHTML: item.type || "(unkown)"
             });
         },
-        _createListNode: function(item) {
+        createListElement: function(id, item) {
             var previewItem = new QuestionEditorPreviewItem({
+                id: id,
                 value: item
             });
-            this.own(previewItem.on('close',
-                                    lang.hitch(this,'removeItem',item)));
+            this.own(previewItem.on('destroy',
+                                    lang.hitch(this,'removeItem',id)));
             previewItem.startup();
-            return previewItem.domNode;
-        },
-        getItems: function() {
-            return array.map(
-                this.source.getAllNodes(),
-                function(node){
-                    return registry.byNode(node).get('value');
-                },this);
+            return previewItem;
         }
     });
Index: /Dev/trunk/client/qed/model/widgets/QuestionEditorPreviewItem.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/QuestionEditorPreviewItem.js	(revision 440)
+++ /Dev/trunk/client/qed/model/widgets/QuestionEditorPreviewItem.js	(revision 441)
@@ -1,4 +1,4 @@
 define([
-    "./QuestionWidgetFactory",
+    "./questions/Factory",
     "dijit/_Container",
     "dijit/_TemplatedMixin",
@@ -6,4 +6,5 @@
     "dijit/_WidgetsInTemplateMixin",
     "dojo/_base/declare",
+    "dojo/_base/event",
     "dojo/_base/fx",
     "dojo/_base/lang",
@@ -13,5 +14,5 @@
     "dojo/on",
     "dojo/text!./templates/QuestionEditorPreviewItem.html"
-], function(QuestionWidgetFactory, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, declare, fx, lang, domClass, domGeom, domStyle, on, template) {
+], function(QuestionWidgetFactory, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, declare, event, fx, lang, domClass, domGeom, domStyle, on, template) {
     return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
         templateString: template,
@@ -31,20 +32,18 @@
                         lang.hitch(this, 'onToggleFold')));
             this.own(this.removeButton.on('click',
-                        lang.hitch(this, 'onClose')));
+                        lang.hitch(this, 'onDestroy')));
             this.own(this.editButton.on('click',
                         lang.hitch(this, 'onToggleEdit')));
-            if (this.value) {
-                this._showEditWidget();
-            } else {
-                throw "No data supplied to create an innerWidget!";
+            this.showEdit();
+        },
+        onDestroy: function() {},
+        _getValueAttr: function(value) {
+            if ( this._editing ) {
+                this.value = this.innerWidget.get('value');
             }
-        },
-        onClose: function() {},
-        _getValueAttr: function(value) {
             return this.value;
         },
         _setValueAttr: function(value) {
             this.value = value;
-            this._destroyInnerWidget();
             if ( this._editing ) {
                 this._showEditWidget();
@@ -53,43 +52,55 @@
             }
         },
-        onToggleEdit: function() {
-            if (this._editing) {
-                if ( this.innerWidget !== null ) {
-                    if (!this.innerWidget.validate ||
-                        this.innerWidget.validate() ) {
-                        this.value = this.innerWidget.get('value');
-                        this._showViewWidget();
-                    }
-                } else {
+        validate: function() {
+            return !this._editing || this.innerWidget.validate();
+        },
+        showView: function() {
+            if ( this._editing ) {
+                if (!this.innerWidget.validate || this.innerWidget.validate() ) {
+                    this.value = this.innerWidget.get('value');
                     this._showViewWidget();
                 }
-            } else {
+            }
+        },
+        showEdit: function() {
+            if (!this._editing) {
                 this._showEditWidget();
             }
         },
+        onToggleEdit: function(evt) {
+            if (this._editing) {
+                this.showView();
+            } else {
+                this.showEdit();
+            }
+            evt && event.stop(evt);
+            return false;
+        },
         _showViewWidget: function() {
-            this._destroyInnerWidget();
-            this.innerWidget = this._factory.createViewWidget( this.value );
-            if ( this.innerWidget !== null ) {
+            var newWidget = this._factory.createViewWidget( this.value );
+            if ( newWidget !== null ) {
+                this._destroyInnerWidget();
+                this.innerWidget = newWidget;
                 this.innerWidget.placeAt(this.containerNode);
                 this.innerWidget.startup();
                 this.innerWidget.set('readOnly',true);
+                this.titleNode.innerHTML = this.value.type+" [preview]";
+                domClass.replace(this.editButton.iconNode, "rftIconEdit", "rftIconAccept");
+                this.editButton.set("label", "Edit");
+                this._editing = false;
             }
-            this.titleNode.innerHTML = this.value.type+" [preview]";
-            domClass.replace(this.editButton.iconNode, "rftIconEdit", "rftIconAccept");
-            this.editButton.set("label", "Edit");
-            this._editing = false;
         },
         _showEditWidget: function() {
-            this._destroyInnerWidget();
-            this.innerWidget = this._factory.createEditWidget( this.value );
-            if ( this.innerWidget !== null ) {
+            var newWidget = this._factory.createEditWidget( this.value );
+            if ( newWidget !== null ) {
+                this._destroyInnerWidget();
+                this.innerWidget = newWidget;
                 this.innerWidget.placeAt(this.containerNode);
                 this.innerWidget.startup();
+                this.titleNode.innerHTML = this.value.type+" [editing]";
+                domClass.replace(this.editButton.iconNode, "rftIconAccept", "rftIconEdit");
+                this.editButton.set("label", "Done");
+                this._editing = true;
             }
-            this.titleNode.innerHTML = this.value.type+" [editing]";
-            domClass.replace(this.editButton.iconNode, "rftIconAccept", "rftIconEdit");
-            this.editButton.set("label", "Done");
-            this._editing = true;
         },
         _destroyInnerWidget: function() {
@@ -98,5 +109,5 @@
             }
         },
-        onToggleFold: function() {
+        onToggleFold: function(evt) {
             if (!this.animation) {
                 if (!domClass.contains(this.domNode, "fold")) {
@@ -130,4 +141,6 @@
                 }
             }
+            evt && event.stop(evt);
+            return false;
         }
 
Index: /Dev/trunk/client/qed/model/widgets/QuestionEditorToolkit.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/QuestionEditorToolkit.js	(revision 440)
+++ /Dev/trunk/client/qed/model/widgets/QuestionEditorToolkit.js	(revision 441)
@@ -25,5 +25,4 @@
         _topicSelect: null,
         _topicStore: null,
-        _categories : null,
 
         _contentItems: [
@@ -37,5 +36,5 @@
             { type: "StringInput" },
             { type: "TextInput" },
-            { type: "IntegerInput" },
+            { type: "NumberInput" },
             { type: "ScaleInput" },
             { type: "MultipleChoiceInput" }
@@ -49,5 +48,5 @@
             "StringInput": "Text line",
             "TextInput": "Free text",
-            "IntegerInput": "Integer number",
+            "NumberInput": "Number",
             "ScaleInput": "Scale",
             "MultipleChoiceInput": "Multiple choice"
@@ -61,5 +60,5 @@
             "StringInput": "Text",
             "TextInput": "Text",
-            "IntegerInput": "Integer",
+            "NumberInput": "Number",
             "ScaleInput": "Scale",
             "MultipleChoiceInput": "MultipleChoice"
@@ -87,13 +86,13 @@
         },
         _setValueAttr: function(question) {
-            this.propertiesForm.set('value', question);
-            this._categories = question.categories || [];
             this._setupListView();
             this._setupCategories();
             this._setupTopic(question.topic);
+            this.propertiesForm.set('value', question);
+            this._list.set('value', question.categories);
         },
         _getValueAttr: function() {
             var value = this.propertiesForm.get('value');
-            value.categories = this._categories;
+            value.categories = this._list.get('value');
             return value;
         },
@@ -125,11 +124,7 @@
         },
         _setupListView: function() {
-            this._list = new CategoryListView( {
-                removeCallback: lang.hitch(this, this._removeCategory)
+            this._list = new CategoryListView({
             }).placeAt(this.listNode);
             this._list.startup();                
-            for (var category in this._categories) {
-                this._list.appendItem(this._categories[category]);
-            }    
         },
         _setupCategories: function() {
@@ -144,6 +139,4 @@
                 searchAttr: "id"
             }, this.categoriesBoxNode);
-            this._supportingWidgets.push(this._categorySelect);
-
         },
         _setupTopic: function(topic) {
@@ -159,12 +152,7 @@
                 value: topic
             }, this.topicBoxNode);
-            this._supportingWidgets.push(this._topicSelect);
         },
         _addCategory: function(item) {
-            this._categories.push(item);
             this._list.appendItem(item);
-        },
-        _removeCategory: function(item) {
-            this._categories.splice(this._categories.indexOf(item), 1);
         }
 
Index: /Dev/trunk/client/qed/model/widgets/QuestionListView.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/QuestionListView.js	(revision 440)
+++ /Dev/trunk/client/qed/model/widgets/QuestionListView.js	(revision 441)
@@ -1,20 +1,14 @@
 define([
-    'dojo/_base/declare',
-    'dojo/_base/lang',
-    'dojo/dom-construct',
-    '../../widgets/LineWithActionsWidget',
-    '../../widgets/list/OrderedList'
-],function(
-    declare,
-    lang,
-    domConstruct,
-    LineWithActionsWidget,
-    OrderedList
-){
-    return declare([OrderedList],{
+    "../../widgets/LineWithActionsWidget",
+    "../../widgets/ListWidget",
+    "dojo/_base/declare",
+    "dojo/_base/lang",
+    "dojo/dom-construct"
+], function(LineWithActionsWidget, ListWidget, declare, lang, domConstruct) {
+    return declare([ListWidget],{
         baseClass: 'rftSurveyListView',
         type: 'question',
 
-        _createAvatarNode: function(item){
+        createAvatar: function(id, item){
             return domConstruct.create("div",{
                 'class': 'dragAvatar',
@@ -22,11 +16,12 @@
             });
         },
-        _createListNode: function(item) {
+        createListElement: function(id, item) {
             var w = new LineWithActionsWidget({
+                id: id,
                 title: item.title,
                 'class': "inheritBgColor",
                 actions: {
                     "Remove" : {
-                        callback: lang.hitch(this, 'removeItem', item),
+                        callback: lang.hitch(this, 'removeItem', id),
                         properties: {
                             blockButton: false,
@@ -48,5 +43,5 @@
             });
             w.startup();
-            return w.domNode;
+            return w;
         }
     });
Index: v/trunk/client/qed/model/widgets/QuestionWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/QuestionWidget.js	(revision 440)
+++ 	(revision )
@@ -1,75 +1,0 @@
-define(['dojo/_base/declare','dojo/_base/lang','dojo/dom-construct','dijit/_WidgetBase',
-    'dijit/_TemplatedMixin','dijit/_WidgetsInTemplateMixin',
-    'dojo/text!./templates/QuestionWidget.html','dijit/form/TextBox',
-    'dijit/form/Textarea','../../widgets/MultipleChoiceWidget'
-], function(declare,lang,domConstruct,_WidgetBase,_TemplatedMixin,
-        _WidgetsInTemplateMixin,templateString,TextBox,Textarea,MultipleChoiceWidget){
-    return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin],{
-        templateString: templateString,
-        mode: 'view', // view || edit
-        name: '',
-        value: null,
-        _scale: null,
-        _widgetCache: null,
-        constructor: function() {
-            this.inherited(arguments);
-            this.value = {};
-            this._widgetCache = {};
-        },
-        postCreate: function() {
-            this._resetValue = this.value;
-            this.scaleSelector.set('disabled', this.mode === 'edit');
-        },
-        _setValueAttr: function(value) {
-            this.value = value;
-            this._onTypeChange(value.scale || 'string');
-            this.ourForm.set('value',value);
-        },
-        _getValueAttr: function() {
-            var value = this.ourForm.get('value');
-            lang.mixin(this.value,value);
-            return this.value;
-        },
-        _onTypeChange: function(scale) {
-            if ( this._scale === scale ) { return; }
-            this._scale = scale;
-            domConstruct.empty(this.scaleDetails);
-            var widget = this._getTypeWidget(scale);
-            if ( widget ) { widget.placeAt(this.scaleDetails,'only'); }
-        },
-        _getTypeWidget: function(scale) {
-            var widget = this._widgetCache[scale];
-            if (!widget) {
-                switch(scale) {
-                case 'string':
-                    widget = new TextBox({
-                        name: 'answers',
-                        disabled: this.mode === 'view'
-                    });
-                    break;
-                case 'text':
-                    widget = new Textarea({
-                        name: 'answers',
-                        disabled: this.mode === 'view',
-                        style: 'min-height: 120px'
-                    });
-                    break;
-                case 'singleChoice':
-                case 'multipleChoice':
-                    widget = new MultipleChoiceWidget({
-                        name: 'answers',
-                        mode: this.mode,
-                        allowMultiple: scale === 'multipleChoice'
-                    });
-                    break;
-                }
-                this._widgetCache[scale] = widget;
-            }
-            return widget;
-        },
-        reset: function() {
-            this.ourForm.reset();
-            this._setValueAttr(this._resetValue);
-        }
-    });
-});
Index: v/trunk/client/qed/model/widgets/QuestionWidgetFactory.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/QuestionWidgetFactory.js	(revision 440)
+++ 	(revision )
@@ -1,413 +1,0 @@
-define([
-    "../../widgets/list/OrderedList",
-    "../../widgets/list/_EditableListMixin",
-    "./ScaleInputConfigWidget",
-    "./ScaleInputWidget",
-    "dijit/_Container",
-    "dijit/_TemplatedMixin",
-    "dijit/_WidgetBase",
-    "dijit/form/Button",
-    "dijit/form/CheckBox",
-    "dijit/form/Form",
-    "dijit/form/NumberSpinner",
-    "dijit/form/RadioButton",
-    "dijit/form/TextBox",
-    "dijit/form/Textarea",
-    "dojo/_base/array",
-    "dojo/_base/declare",
-    "dojo/_base/lang",
-    "dojo/dom-construct",
-    "dojox/layout/TableContainer"
-], function(OrderedList, _EditableListMixin, ScaleInputConfigWidget, ScaleInputWidget, _Container, _TemplatedMixin, _WidgetBase, Button, CheckBox, Form, NumberSpinner, RadioButton, TextBox, Textarea, array, declare, lang, domConstruct, TableContainer) {
-    var factory = declare(null, {
-        createViewWidget: function(/*Object*/options) {
-            // options: Object
-            //            type: "Header", "Text", "TextInput", etc.
-            //            other type specific fields
-            var fun = this['create'+options.type+'ViewWidget'];
-            var view = fun !== undefined ? fun(options) : null;
-            return view;
-        },
-        createEditWidget: function(/*Object*/options) {
-            var fun = this['create'+options.type+'EditWidget'];
-            var view = fun !== undefined ? fun() : null;
-            if (view) {
-                view.set('value', options);
-            }
-            return view;
-        },
-
-        createHeaderViewWidget: function(options) {
-            return new HeaderView({
-                options: options
-            });
-        },
-        createHeaderEditWidget: function() {
-            return new HeaderEdit();
-        },
-
-        createTextViewWidget: function(options) {
-            return new TextView({
-                options: options
-            });
-        },
-        createTextEditWidget: function() {
-            return new TextEdit();
-        },
-
-        createDividerViewWidget: function(options) {
-            return new DividerView({
-                options: options
-            });
-        },
-
-        createStringInputViewWidget: function(options) {
-            return new StringInputView({
-                options: options
-            });
-        },
-        createStringInputEditWidget: function() {
-            return new StringInputEdit();
-        },
-
-        createTextInputViewWidget: function(options) {
-            return new TextInputView({
-                options: options
-            });
-        },
-        createTextInputEditWidget: function() {
-            return new TextInputEdit();
-        },
-
-        createIntegerInputViewWidget: function(options) {
-            return new IntegerInputView({
-                options: options
-            });
-        },
-        createIntegerInputEditWidget: function() {
-            return new IntegerInputEdit();
-        },
-
-        createMultipleChoiceInputViewWidget: function(options) {
-            return new MultipleChoiceInputView({
-                options: options
-            });
-        },
-        createMultipleChoiceInputEditWidget: function() {
-            return new MultipleChoiceInputEdit();
-        },
-
-        createScaleInputViewWidget: function(options) {
-            return new ScaleInputWidget(options);
-        },
-        createScaleInputEditWidget: function(options) {
-            return new ScaleInputConfigWidget({
-                value: options || {}
-            });
-        }
-    });
-
-    var DefaultEdit = declare([Form,_Container],{
-        type: null,
-        addChild: function(widget) {
-            domConstruct.create("label",{
-                innerHTML: widget.title || ''
-            },this.containerNode,'last');
-            this.inherited(arguments,[widget]);
-        },
-        _getValueAttr: function() {
-            var val = this.inherited(arguments);
-            val.type = this.type;
-            return val;
-        }
-    });
-
-    var HeaderView = declare([_WidgetBase], {
-        postCreate: function() {
-            this.domNode.innerHTML = "<h2>"+this.options.content+"</h2>";
-        }
-    });
-
-    var HeaderEdit = declare([DefaultEdit], {
-        type: 'Header',
-        postCreate: function() {
-            this.inherited(arguments);
-            this.addChild(new TextBox({
-                title: 'Content',
-                name: 'content'
-            }));
-        }
-    });
-
-    var TextView = declare([_WidgetBase], {
-        postCreate: function() {
-            this.domNode.innerHTML = "<p>"+this.options.content+"</p>";
-        }
-    });
-
-    var TextEdit = declare([DefaultEdit], {
-        type: 'Text',
-        postCreate: function() {
-            this.inherited(arguments);
-            this.addChild(new Textarea({
-                title: 'Content',
-                name: 'content'
-            }));
-        }
-    });
-
-    var DividerView = declare([_WidgetBase], {
-        postCreate: function() {
-            this.domNode.innerHTML = "<hr>";
-        }
-    });
-
-    var DefaultInputEdit = declare([DefaultEdit],{
-        postCreate: function() {
-            this.inherited(arguments);
-            this.addChild(new TextBox({
-                title: 'Text',
-                name: 'text'
-            }));
-        }
-    });
-
-    var StringInputView = declare([_WidgetBase, _Container],{
-        _textBox: null,
-        postCreate: function() {
-            this._textBox = new TextBox({
-                name: this.options.code || ''
-            });
-            this.addChild(this._textBox);
-            this._textBox.startup();
-        },
-        _setReadOnlyAttr: function(value) {
-            this._textBox.set('readOnly', value);
-        },
-        _getCodeAttr: function() {
-            return this.options.code;
-        },
-        _getValueAttr: function() {
-            return this._textBox.get('value') || "";
-        },
-        _setValueAttr: function(value) {
-            this._textBox.set('value',value || "");
-        }
-    });
-
-    var StringInputEdit = declare([DefaultInputEdit],{
-        type: 'StringInput'
-    });
-
-    var TextInputView = declare([_WidgetBase, _Container], {
-        _textArea: null,
-        postCreate: function() {
-            this._textArea = new Textarea({
-                name: this.options.code
-            });
-            this._textArea.set('maxLength', this.options.maxLength || 1000);
-            this._textArea.set('value', this.options.defaultValue || "");
-            this.addChild(this._textArea);
-            this._textArea.startup();
-        },
-        _getCodeAttr: function() {
-            return this.options.code;
-        },
-        _getValueAttr: function() {
-            return this._textArea.get('value');
-        },
-        _setReadOnlyAttr: function(value) {
-            this._textArea.set('readOnly', value);
-        }
-    });
-
-    var TextInputEdit = declare([DefaultInputEdit], {
-        type: 'TextInput',
-        postCreate: function() {
-            this.inherited(arguments);
-            this.addChild(new NumberSpinner({
-                name: 'maxLength',
-                title: "Maximum length",
-                constraints: {
-                    min: 0
-                }
-            }));
-        }
-    });
-
-    var IntegerInputView = declare([_WidgetBase, _Container], {
-        _numberInput: null,
-        postCreate: function() {
-            this._numberInput = new NumberSpinner({
-                name: this.options.code || '',
-                constraints: {
-                    min: this.options.min,
-                    max: this.options.max,
-                    smallDelta: this.options.step
-                }
-            });
-            this.addChild(this._numberInput);
-            this._numberInput.startup();
-        },
-        _getCodeAttr: function() {
-            return this.options.code;
-        },
-        _getValueAttr: function() {
-            return this._numberInput.get('value');
-        },
-        _setReadOnlyAttr: function(value) {
-            this._numberInput.set('readOnly', value);
-        }
-    });
-
-    var IntegerInputEdit = declare([DefaultInputEdit], {
-        type: 'IntegerInput',
-        postCreate: function() {
-            this.inherited(arguments);
-            this.addChild(new NumberSpinner({
-                title: "Minimum",
-                name: 'min'
-            }));
-            this.addChild(new NumberSpinner({
-                title: "Maximum",
-                name: 'max'
-            }));
-            this.addChild(new NumberSpinner({
-                title: "Step",
-                name: 'step'
-            }));
-        }
-    });
-
-    var MultipleChoiceInputView = declare([_WidgetBase, _Container], {
-        postCreate: function() {
-            var table = new TableContainer({ cols: 1, customClass: "labelsAndValues"} );
-
-            var Ctor = this.options.multiple === true ? CheckBox : RadioButton;
-            array.forEach(this.options.items || [], function(item){
-                table.addChild(new Ctor({
-                    name: this.options.code || '',
-                    title: item
-                }));
-            },this);
-
-            this.addChild(table);
-            table.startup();
-        },
-        _getCodeAttr: function() {
-            return this.options.code;
-        },
-        _getValueAttr: function() {
-            var checked = array.filter(this.getChildren(),function(child){
-                return child.get('checked');
-            });
-            if ( this.options.multiple ) {
-                return array.map(checked,function(child){
-                    return child.get('value');
-                });
-            } else {
-                return checked.length > 0 ? checked[0].get('value') : null;
-            }
-        },
-        _setReadOnlyAttr: function(value) {
-            array.forEach(this.getChildren(),function(child){
-                child.set('readOnly', value);
-            },this);
-        }
-    });
-
-    var MCOptionItem = declare([_WidgetBase,_TemplatedMixin,_Container],{
-        templateString: '<div><span class="dojoDndHandle">=</span></div>',
-        _textBox: null,
-        postCreate: function() {
-            this._textBox = new TextBox({});
-            this.addChild(this._textBox);
-            this._textBox.startup();
-
-            var del = new Button({
-                label: "X",
-                onClick: lang.hitch(this,'onDelete')
-            });
-            this.addChild(del);
-            del.startup();
-        },
-        _getValueAttr: function() {
-            return this._textBox.set('value');
-        },
-        _setValueAttr: function(value) {
-            this._textBox.set('value',value);
-        },
-        onDelete: function(){}
-    });
-
-    var MCOptionList = declare([OrderedList,_EditableListMixin],{
-        type: 'multipleChoiceOption',
-        withHandles: true,
-        _createAvatarNode: function(item){
-            return domConstruct.create("div",{
-                'class': 'dragAvatar',
-                innerHTML: item
-            });
-        },
-        _createListNode: function(item) {
-            var w = new MCOptionItem();
-            w.startup();
-            w.set('value',item);
-            w.on('delete',lang.hitch(this,'_onRemove',w,item));
-            return w.domNode;
-        },
-        _onRemove: function(w,item) {
-            w.destroyRecursive();
-            if ( this.removeCallback ) { this.removeCallback(item); }
-            this.source.sync();
-        }
-    });
-
-    var MultipleChoiceInputEdit = declare([_WidgetBase, _Container], {
-        _multipleInput: null,
-        postCreate: function() {
-            var table = new TableContainer({ cols: 1, customClass: "labelsAndValues"} );
-
-            this._multipleInput = new CheckBox({
-                title: "Allow multiple"
-            });
-            table.addChild(this._multipleInput);
-            this._multipleInput.startup();
-
-            var add = new Button({
-                label: "Add",
-                onClick: lang.hitch(this,'_addOption',"")
-            });
-            table.addChild(add);
-            add.startup();
-
-            this._optionsList = new MCOptionList();
-            table.addChild(this._optionsList);
-            this._optionsList.startup();
-
-            this.addChild(table);
-            table.startup();
-        },
-
-        _addOption: function() {
-            this._optionsList.appendItems([""]);
-        },
-
-        _setValueAttr: function(value) {
-            this._multipleInput.set('checked', value.multiple);
-            this._optionsList.deleteItems();
-            this._optionsList.appendItems(value.items || []);
-        },
-        _getValueAttr: function() {
-            return {
-                type: "MultipleChoiceInput",
-                multiple: this._multipleInput.get('checked'),
-                items: array.map(this._optionsList.getItems(),function(item){
-                    return item.get('value');
-                },this)
-            };
-        }
-    });
-
-    return factory;
-});
Index: v/trunk/client/qed/model/widgets/ScaleInputConfigWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/ScaleInputConfigWidget.js	(revision 440)
+++ 	(revision )
@@ -1,96 +1,0 @@
-define([
-    "dijit/_Container",
-    "dijit/_TemplatedMixin",
-    "dijit/_WidgetBase",
-    "dijit/_WidgetsInTemplateMixin",
-    "dijit/form/Button",
-    "dijit/form/RadioButton",
-    "dijit/form/TextBox",
-    "dijit/form/ValidationTextBox",
-    "dijit/form/_FormMixin",
-    "dojo/_base/array",
-    "dojo/_base/declare",
-    "dojo/_base/event",
-    "dojo/_base/lang",
-    "dojo/dom-attr",
-    "dojo/dom-construct",
-    "dojo/dom-style",
-    "dojo/text!./templates/ScaleInputConfigRowWidget.html",
-    "dojo/text!./templates/ScaleInputConfigWidget.html",
-    "dijit/form/NumberTextBox",
-    "dijit/form/TextBox"
-], function(_Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, Button, RadioButton, TextBox, ValidationTextBox, _FormMixin, array, declare, event, lang, domAttr, domConstruct, domStyle, rowTemplate, template) {
-
-    var Row = declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container,_FormMixin],{
-        templateString: rowTemplate,
-        hasNA: true,
-        startup: function() {
-            if ( this._started ) { return; }
-            this.inherited(arguments);
-        },
-        onDestroy: function(e) {
-            this.destroyRecursive();
-            event.stop(e);
-            return false;
-        },
-        _setHasNAAttr: function(value) {
-            if ( value === true ) {
-                domStyle.set(this.naRadioButton.domNode, "display", "");
-            } else {
-                domStyle.set(this.naRadioButton.domNode, "display", "none");
-            }
-        }
-    });
-    
-    return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container,_FormMixin],{
-        templateString: template,
-        baseClass: "qedScaleWidget",
-        value: null,
-        _hasNA: false,
-        constuctor: function() {
-            this.inherited(arguments);
-            this.value = {};
-        },
-        onAddItem: function(e) {
-            this._addItem();
-            event.stop(e);
-            return false;
-        },
-        _clearItems: function() {
-            domConstruct.empty(this.itemsNode);
-        },
-        _addItem: function(value) {
-            var item = new Row({
-                name: 'items',
-                value: value,
-                hasNA: this._hasNA
-            });
-            item.placeAt(this.itemsNode);
-            return item;
-        },
-        _setValueAttr: function(value) {
-            this.inherited(arguments);
-            this._clearItems();
-            array.forEach(value.items, function(value){
-                this._addItem(value);
-            }, this);
-        },
-        _getValueAttr: function(){
-            var value = this.inherited(arguments);
-            if ( value.items && !lang.isArray(value.items) ) {
-                value.items = [value.items];
-            }
-            value.type = 'ScaleInput';
-            return value;
-        },
-        onNAChange: function(value) {
-            this._hasNA = value !== null && value !== "";
-            this._updateNA();
-        },
-        _updateNA: function(value) {
-            array.forEach(this.getChildren(), function(child) {
-                child.set('hasNA', this._hasNA);
-            }, this);
-        }
-    });
-});
Index: v/trunk/client/qed/model/widgets/ScaleInputWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/ScaleInputWidget.js	(revision 440)
+++ 	(revision )
@@ -1,82 +1,0 @@
-define([
-    "dijit/_Container",
-    "dijit/_TemplatedMixin",
-    "dijit/_WidgetBase",
-    "dijit/form/RadioButton",
-    "dijit/form/_FormMixin",
-    "dojo/_base/array",
-    "dojo/_base/declare",
-    "dojo/_base/lang",
-    "dojo/dom-attr",
-    "dojo/dom-construct",
-    "dojo/text!./templates/ScaleInputWidget.html"
-], function(_Container, _TemplatedMixin, _WidgetBase, RadioButton, _FormMixin, array, declare, lang, domAttr, domConstruct, template) {
-    return declare([_WidgetBase,_TemplatedMixin,_Container,_FormMixin],{
-        templateString: template,
-        baseClass: "qedScaleWidget",
-        min: 0,
-        max: 0,
-        minLabel: "",
-        maxLabel: "",
-        naLabel: null,
-        items: null,
-        value: null,
-        constuctor: function() {
-            this.items = [];
-            this.value = {};
-        },
-        startup: function() {
-            if ( this._started ) { return; }
-            this.inherited(arguments);
-            this._renderHead();
-            this._renderItems();
-        },
-        _renderHead: function() {
-            this.minNode.innerHTML = this.minLabel || "";
-            this.maxNode.innerHTML = this.maxLabel || "";
-            if ( this.naLabel !== null ) {
-                this.naNode.innerHTML = this.naLabel;
-            }
-            for (var i = this.min; i <= this.max; i++) {
-                domConstruct.create("th", {
-                    innerHTML: i.toString()
-                }, this.minNode, "after");
-            }
-        },
-        _renderItems: function() {
-            array.forEach(this.items, function(item,index) {
-                var tr = domConstruct.create("tr", {}, this.itemsNode);
-                var td;
-                var radio;
-                domConstruct.create("th", {
-                    innerHTML: item.text || "",
-                    'class': "item"
-                }, tr);
-                domConstruct.create("th", {
-                    innerHTML: item.minLabel || "",
-                    'class': 'min'
-                }, tr);
-                for (var i = this.min; i <= this.max; i++) {
-                    td = domConstruct.create("td", {}, tr);
-                    radio = new RadioButton({
-                        name: index.toString(),
-                        value: i.toString()
-                    });
-                    domConstruct.place(radio.domNode, td); 
-                }
-                domConstruct.create("th", {
-                    innerHTML: item.maxLabel || "",
-                    className: 'max'
-                }, tr);
-                if ( this.naLabel !== null ) {
-                    td = domConstruct.create("td", {}, tr);
-                    radio = new RadioButton({
-                        name: index.toString(),
-                        value: "n/a"
-                    });
-                    domConstruct.place(radio.domNode, td); 
-                }
-            }, this);
-        }
-    });
-});
Index: /Dev/trunk/client/qed/model/widgets/SurveyWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/SurveyWidget.js	(revision 440)
+++ /Dev/trunk/client/qed/model/widgets/SurveyWidget.js	(revision 441)
@@ -1,5 +1,5 @@
 define([
     "../classes/Survey",
-    "../widgets/QuestionWidgetFactory",
+    "./questions/Factory",
     "dijit/_Container",
     "dijit/_TemplatedMixin",
Index: /Dev/trunk/client/qed/model/widgets/questions/Factory.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/Factory.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/Factory.js	(revision 441)
@@ -0,0 +1,111 @@
+define([
+    "./HeaderConfigWidget",
+    "./HeaderWidget",
+    "./MultipleChoiceInputConfigWidget",
+    "./MultipleChoiceInputWidget",
+    "./NumberInputConfigWidget",
+    "./NumberInputWidget",
+    "./ScaleInputConfigWidget",
+    "./ScaleInputWidget",
+    "./StringInputConfigWidget",
+    "./StringInputWidget",
+    "./TextConfigWidget",
+    "./TextInputConfigWidget",
+    "./TextInputWidget",
+    "./TextWidget",
+    "dijit/_WidgetBase",
+    "dojo/_base/declare"
+], function(HeaderConfigWidget, HeaderWidget, MultipleChoiceInputConfigWidget, MultipleChoiceInputWidget, NumberInputConfigWidget, NumberInputWidget, ScaleInputConfigWidget, ScaleInputWidget, StringInputConfigWidget, StringInputWidget, TextConfigWidget, TextInputConfigWidget, TextInputWidget, TextWidget, _WidgetBase, declare) {
+    var factory = declare(null, {
+        createViewWidget: function(/*Object*/options) {
+            // options: Object
+            //            type: "Header", "Text", "TextInput", etc.
+            //            other type specific fields
+            var fun = this['create'+options.type+'ViewWidget'];
+            var view = fun !== undefined ? fun(options) : null;
+            return view;
+        },
+        createEditWidget: function(/*Object*/options) {
+            var fun = this['create'+options.type+'EditWidget'];
+            var view = fun !== undefined ? fun(options) : null;
+            return view;
+        },
+
+        createHeaderViewWidget: function(config) {
+            return new HeaderWidget(config);
+        },
+        createHeaderEditWidget: function(config) {
+            return new HeaderConfigWidget({
+                value: config
+            });
+        },
+
+        createTextViewWidget: function(config) {
+            return new TextWidget(config);
+        },
+        createTextEditWidget: function(config) {
+            return new TextConfigWidget({
+                value: config
+            });
+        },
+
+        createDividerViewWidget: function(options) {
+            return new DividerView({
+                options: options
+            });
+        },
+
+        createStringInputViewWidget: function(config) {
+            return new StringInputWidget(config);
+        },
+        createStringInputEditWidget: function(config) {
+            return new StringInputConfigWidget({
+                value: config
+            });
+        },
+
+        createTextInputViewWidget: function(config) {
+            return new TextInputWidget(config);
+        },
+        createTextInputEditWidget: function(config) {
+            return new TextInputConfigWidget({
+                value: config
+            });
+        },
+
+        createNumberInputViewWidget: function(config) {
+            return new NumberInputWidget(config);
+        },
+        createNumberInputEditWidget: function(config) {
+            return new NumberInputConfigWidget({
+                value: config
+            });
+        },
+
+        createMultipleChoiceInputViewWidget: function(config) {
+            return new MultipleChoiceInputWidget(config);
+        },
+        createMultipleChoiceInputEditWidget: function(config) {
+            return new MultipleChoiceInputConfigWidget({
+                value: config
+            });
+        },
+
+        createScaleInputViewWidget: function(options) {
+            return new ScaleInputWidget(options);
+        },
+        createScaleInputEditWidget: function(options) {
+            return new ScaleInputConfigWidget({
+                value: options || {}
+            });
+        }
+    });
+
+    var DividerView = declare([_WidgetBase], {
+        postCreate: function() {
+            this.domNode.innerHTML = "<hr>";
+        }
+    });
+
+    return factory;
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/HeaderConfigWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/HeaderConfigWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/HeaderConfigWidget.js	(revision 441)
@@ -0,0 +1,15 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dojo/_base/declare",
+    "dojo/text!./templates/HeaderConfigWidget.html"
+], function(_ComplexValueWidget, declare, template) {
+    return declare([_ComplexValueWidget],{
+        type: 'Header',
+        templateString: template,
+        _getValueAttr: function() {
+            var value = this.inherited(arguments);
+            value.type = this.type;
+            return value;
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/HeaderWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/HeaderWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/HeaderWidget.js	(revision 441)
@@ -0,0 +1,11 @@
+define([
+    "dijit/_TemplatedMixin",
+    "dijit/_WidgetBase",
+    "dojo/_base/declare",
+    "dojo/text!./templates/HeaderWidget.html"
+], function(_TemplatedMixin, _WidgetBase, declare, template) {
+    return declare([_WidgetBase,_TemplatedMixin],{
+        templateString: template,
+        text: ''
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/MultipleChoiceInputConfigWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/MultipleChoiceInputConfigWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/MultipleChoiceInputConfigWidget.js	(revision 441)
@@ -0,0 +1,68 @@
+define([
+    "../../../widgets/ListWidget",
+    "../../../widgets/_ComplexValueWidget",
+    "dijit/_TemplatedMixin",
+    "dijit/_WidgetBase",
+    "dijit/_WidgetsInTemplateMixin",
+    "dojo/_base/declare",
+    "dojo/_base/event",
+    "dojo/_base/lang",
+    "dojo/dom-construct",
+    "dojo/text!./templates/MultipleChoiceInputConfigRowWidget.html",
+    "dojo/text!./templates/MultipleChoiceInputConfigWidget.html"
+], function(ListWidget, _ComplexValueWidget, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, declare, event, lang, domConstruct, rowTemplate, template) {
+
+    var Row = declare([_ComplexValueWidget],{
+        templateString: rowTemplate,
+        onDestroy: function(evt) {}
+    });
+    
+    return declare([_ComplexValueWidget],{
+        type: 'MultipleChoiceInput',
+        templateString: template,
+        buildRendering: function() {
+            this.inherited(arguments);
+            this.itemsWidget = new ListWidget({
+                name: "items",
+                type: "MultipleChoiceItem",
+                skipForm: true,
+                delay: 5,
+                createListElement: lang.hitch(this, "_createRow"),
+                createAvatar: lang.hitch(this, "_createAvatar")
+            }, this.itemsNode);
+        },
+        _createRow: function(id, item) {
+            var widget = new Row({
+                id: id,
+                value: item,
+                onDestroy: lang.hitch(this,function(evt){
+                    this.itemsWidget.removeItem(id);
+                    event.stop(evt);
+                    return false;
+                })
+            });
+            widget.startup();
+            return widget;
+        },
+        _createAvatar: function(id, item) {
+            return domConstruct.create("div", {
+                innerHTML: item.text || "(empty)"
+            });
+        },
+        _getValueAttr: function() {
+            var value = this.inherited(arguments);
+            value.allowMultiple = value.allowMultiple && value.allowMultiple.length > 0;
+            value.type = this.type;
+            return value;
+        },
+        _setValueAttr: function(value) {
+            value.allowMultiple = value.allowMultiple === true ? ["on"] : [];
+            this.inherited(arguments);
+        },
+        onAddItem: function(evt) {
+            this.itemsWidget.appendItem({});
+            event.stop(evt);
+            return false;
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/MultipleChoiceInputWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/MultipleChoiceInputWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/MultipleChoiceInputWidget.js	(revision 441)
@@ -0,0 +1,30 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dijit/form/CheckBox",
+    "dijit/form/RadioButton",
+    "dojo/_base/array",
+    "dojo/_base/declare",
+    "dojo/dom-construct",
+    "dojo/text!./templates/MultipleChoiceInputWidget.html"
+], function(_ComplexValueWidget, CheckBox, RadioButton, array, declare, domConstruct, template) {
+    return declare([_ComplexValueWidget],{
+        templateString: template,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+
+            domConstruct.empty(this.domNode);
+            var Ctor = this.allowMultiple === true ? CheckBox : RadioButton;
+            array.forEach(this.items, function(item, index){
+                var div = domConstruct.create("div", {
+                }, this.domNode, "last");
+                var input = new Ctor({
+                    name: index.toString()
+                }).placeAt(div);
+                var label = domConstruct.create("label",{
+                    innerHTML: item.text
+                }, div);
+            }, this);
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/NumberInputConfigWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/NumberInputConfigWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/NumberInputConfigWidget.js	(revision 441)
@@ -0,0 +1,15 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dojo/_base/declare",
+    "dojo/text!./templates/NumberInputConfigWidget.html"
+], function(_ComplexValueWidget, declare, template) {
+    return declare([_ComplexValueWidget],{
+        type: 'NumberInput',
+        templateString: template,
+        _getValueAttr: function() {
+            var value = this.inherited(arguments);
+            value.type = this.type;
+            return value;
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/NumberInputWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/NumberInputWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/NumberInputWidget.js	(revision 441)
@@ -0,0 +1,30 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dojo/_base/declare",
+    "dojo/text!./templates/NumberInputWidget.html"
+], function(_ComplexValueWidget, declare, template) {
+    return declare([_ComplexValueWidget],{
+        text: '',
+        maxLength: null,
+        templateString: template,
+        startup: function() {
+            var constraints = {};
+            if ( this.min !== null && !isNaN(this.min) ) {
+                constraints.min = this.min;
+            }
+            if ( this.max !== null && !isNaN(this.max) ) {
+                constraints.max = this.max;
+            }
+            if ( this.places !== null && !isNaN(this.places) ) {
+                constraints.places = this.places;
+            }
+            this.numberBox.set('constraints', constraints);
+        },
+        _getValueAttr: function() {
+            return this.numberBox.get('value');
+        },
+        _setValueAttr: function(value) {
+            return this.numberBox.set('value', value);
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/ScaleInputConfigWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/ScaleInputConfigWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/ScaleInputConfigWidget.js	(revision 441)
@@ -0,0 +1,96 @@
+define([
+    "../../../widgets/ListWidget",
+    "../../../widgets/_ComplexValueWidget",
+    "dijit/form/Button",
+    "dijit/form/RadioButton",
+    "dijit/form/TextBox",
+    "dijit/form/ValidationTextBox",
+    "dojo/_base/array",
+    "dojo/_base/declare",
+    "dojo/_base/event",
+    "dojo/_base/lang",
+    "dojo/dom-attr",
+    "dojo/dom-construct",
+    "dojo/dom-style",
+    "dojo/text!./templates/ScaleInputConfigRowWidget.html",
+    "dojo/text!./templates/ScaleInputConfigWidget.html",
+    "dijit/form/NumberTextBox",
+    "dijit/form/TextBox"
+], function(ListWidget, _ComplexValueWidget, Button, RadioButton, TextBox, ValidationTextBox, array, declare, event, lang, domAttr, domConstruct, domStyle, rowTemplate, template) {
+
+    var Row = declare([_ComplexValueWidget],{
+        templateString: rowTemplate,
+        hasNA: true,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+        },
+        onDestroy: function(evt) {},
+        _setHasNAAttr: function(value) {
+            if ( value === true ) {
+                domStyle.set(this.naRadioButton.domNode, "display", "");
+            } else {
+                domStyle.set(this.naRadioButton.domNode, "display", "none");
+            }
+        }
+    });
+    
+    return declare([_ComplexValueWidget],{
+        templateString: template,
+        baseClass: "qedScaleWidget",
+        _hasNA: false,
+        constuctor: function() {
+            this.inherited(arguments);
+            this.value = {};
+        },
+        buildRendering: function() {
+            this.inherited(arguments);
+            this.itemsWidget = new ListWidget({
+                name: "items",
+                type: "ScaleItem",
+                delay: 5,
+                skipForm: true,
+                createListElement: lang.hitch(this, "_createRowWidget"),
+                createAvatar: lang.hitch(this, "_createAvatar")
+            }, this.itemsNode);
+        },
+        _createRowWidget: function(id, item) {
+            var widget = new Row({
+                value: item,
+                hasNA: this._hasNA,
+                id: id,
+                onDestroy: lang.hitch(this,function(evt){
+                    this.itemsWidget.removeItem(id);
+                    event.stop(evt);
+                    return false;
+                })
+            });
+            widget.startup();
+            return widget;
+        },
+        _createAvatar: function(id, item) {
+            return domConstruct.create("div", {
+                innerHTML: item.text || "(empty item)"
+            });
+        },
+        onAddNewItem: function(e) {
+            this.itemsWidget.appendItem({});
+            event.stop(e);
+            return false;
+        },
+        _getValueAttr: function(){
+            var value = this.inherited(arguments);
+            value.type = 'ScaleInput';
+            return value;
+        },
+        onNAChange: function(value) {
+            this._hasNA = value !== null && value !== "";
+            this._updateNA();
+        },
+        _updateNA: function(value) {
+            array.forEach(this.itemsWidget.getChildren(), function(child) {
+                child.set('hasNA', this._hasNA);
+            }, this);
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/ScaleInputWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/ScaleInputWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/ScaleInputWidget.js	(revision 441)
@@ -0,0 +1,79 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dijit/form/RadioButton",
+    "dojo/_base/array",
+    "dojo/_base/declare",
+    "dojo/_base/lang",
+    "dojo/dom-attr",
+    "dojo/dom-construct",
+    "dojo/text!./templates/ScaleInputWidget.html"
+], function(_ComplexValueWidget, RadioButton, array, declare, lang, domAttr, domConstruct, template) {
+    return declare([_ComplexValueWidget],{
+        templateString: template,
+        baseClass: "qedScaleWidget",
+        min: 0,
+        max: 0,
+        minLabel: "",
+        maxLabel: "",
+        naLabel: null,
+        items: null,
+        value: null,
+        constuctor: function() {
+            this.items = [];
+            this.value = {};
+        },
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            this._renderHead();
+            this._renderItems();
+        },
+        _renderHead: function() {
+            this.minNode.innerHTML = this.minLabel || "";
+            this.maxNode.innerHTML = this.maxLabel || "";
+            if ( this.naLabel !== null ) {
+                this.naNode.innerHTML = this.naLabel;
+            }
+            for (var i = this.min; i <= this.max; i++) {
+                domConstruct.create("th", {
+                    innerHTML: i.toString()
+                }, this.maxNode, "before");
+            }
+        },
+        _renderItems: function() {
+            array.forEach(this.items, function(item,index) {
+                var tr = domConstruct.create("tr", {}, this.itemsNode);
+                var td;
+                var radio;
+                domConstruct.create("th", {
+                    innerHTML: item.text || "",
+                    'class': "item"
+                }, tr);
+                domConstruct.create("th", {
+                    innerHTML: item.minLabel || "",
+                    'class': 'min'
+                }, tr);
+                for (var i = this.min; i <= this.max; i++) {
+                    td = domConstruct.create("td", {}, tr);
+                    radio = new RadioButton({
+                        name: index.toString(),
+                        value: i.toString()
+                    });
+                    domConstruct.place(radio.domNode, td); 
+                }
+                domConstruct.create("th", {
+                    innerHTML: item.maxLabel || "",
+                    className: 'max'
+                }, tr);
+                if ( this.naLabel !== null && this.naLabel !== "" ) {
+                    td = domConstruct.create("td", {}, tr);
+                    radio = new RadioButton({
+                        name: index.toString(),
+                        value: "n/a"
+                    });
+                    domConstruct.place(radio.domNode, td); 
+                }
+            }, this);
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/StringInputConfigWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/StringInputConfigWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/StringInputConfigWidget.js	(revision 441)
@@ -0,0 +1,15 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dojo/_base/declare",
+    "dojo/text!./templates/StringInputConfigWidget.html"
+], function(_ComplexValueWidget, declare, template) {
+    return declare([_ComplexValueWidget],{
+        type: 'StringInput',
+        templateString: template,
+        _getValueAttr: function() {
+            var value = this.inherited(arguments);
+            value.type = this.type;
+            return value;
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/StringInputWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/StringInputWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/StringInputWidget.js	(revision 441)
@@ -0,0 +1,16 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dojo/_base/declare",
+    "dojo/text!./templates/StringInputWidget.html"
+], function(_ComplexValueWidget, declare, template) {
+    return declare([_ComplexValueWidget],{
+        text: '',
+        templateString: template,
+        _getValueAttr: function() {
+            return this.textBox.get('value');
+        },
+        _setValueAttr: function(value) {
+            return this.textBox.set('value', value);
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/TextConfigWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/TextConfigWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/TextConfigWidget.js	(revision 441)
@@ -0,0 +1,15 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dojo/_base/declare",
+    "dojo/text!./templates/TextConfigWidget.html"
+], function(_ComplexValueWidget, declare, template) {
+    return declare([_ComplexValueWidget],{
+        type: 'Text',
+        templateString: template,
+        _getValueAttr: function() {
+            var value = this.inherited(arguments);
+            value.type = this.type;
+            return value;
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/TextInputConfigWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/TextInputConfigWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/TextInputConfigWidget.js	(revision 441)
@@ -0,0 +1,15 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dojo/_base/declare",
+    "dojo/text!./templates/TextInputConfigWidget.html"
+], function(_ComplexValueWidget, declare, template) {
+    return declare([_ComplexValueWidget],{
+        type: 'TextInput',
+        templateString: template,
+        _getValueAttr: function() {
+            var value = this.inherited(arguments);
+            value.type = this.type;
+            return value;
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/TextInputWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/TextInputWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/TextInputWidget.js	(revision 441)
@@ -0,0 +1,22 @@
+define([
+    "../../../widgets/_ComplexValueWidget",
+    "dojo/_base/declare",
+    "dojo/text!./templates/TextInputWidget.html"
+], function(_ComplexValueWidget, declare, template) {
+    return declare([_ComplexValueWidget],{
+        text: '',
+        maxLength: null,
+        templateString: template,
+        startup: function() {
+            if ( this.maxLength ) {
+                this.textArea.set('maxLength', this.maxLength);
+            }
+        },
+        _getValueAttr: function() {
+            return this.textBox.get('value');
+        },
+        _setValueAttr: function(value) {
+            return this.textBox.set('value', value);
+        }
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/TextWidget.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/TextWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/TextWidget.js	(revision 441)
@@ -0,0 +1,11 @@
+define([
+    "dijit/_TemplatedMixin",
+    "dijit/_WidgetBase",
+    "dojo/_base/declare",
+    "dojo/text!./templates/TextWidget.html"
+], function(_TemplatedMixin, _WidgetBase, declare, template) {
+    return declare([_WidgetBase,_TemplatedMixin],{
+        templateString: template,
+        text: ''
+    });
+});
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/HeaderConfigWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/HeaderConfigWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/HeaderConfigWidget.html	(revision 441)
@@ -0,0 +1,4 @@
+<div>
+  <label for="text" class="qedLabel">Text</label>
+  <div class="qedField" data-dojo-type="dijit/form/TextBox" name="text"></div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/HeaderWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/HeaderWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/HeaderWidget.html	(revision 441)
@@ -0,0 +1,1 @@
+<h2>${text}</h2>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/MultipleChoiceInputConfigRowWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/MultipleChoiceInputConfigRowWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/MultipleChoiceInputConfigRowWidget.html	(revision 441)
@@ -0,0 +1,3 @@
+<div>
+  <div data-dojo-type="dijit/form/ValidationTextBox" name="text" required="required" data-dojo-attach-point="textBox"></div><div data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onDestroy">X</div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/MultipleChoiceInputConfigWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/MultipleChoiceInputConfigWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/MultipleChoiceInputConfigWidget.html	(revision 441)
@@ -0,0 +1,9 @@
+<div>
+  <div>
+    <label class="qedLabel" for="allowMultiple">Allow multiple</label>
+    <div name="allowMultiple" data-dojo-type="dijit/form/CheckBox"></div>
+  </div>
+  <div data-dojo-attach-point="itemsNode">
+  </div>
+  <div data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onAddItem">Add item</div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/MultipleChoiceInputWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/MultipleChoiceInputWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/MultipleChoiceInputWidget.html	(revision 441)
@@ -0,0 +1,2 @@
+<div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/NumberInputConfigWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/NumberInputConfigWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/NumberInputConfigWidget.html	(revision 441)
@@ -0,0 +1,18 @@
+<div>
+  <div>
+    <label class="qedLabel" for="text">Item/Question Text</label>
+    <div class="qedField" data-dojo-type="dijit/form/TextBox" data-dojo-props="placeholder: 'Item/Question Text'" name="text"></div>
+  </div>
+  <div>
+    <label class="qedLabel" for="min">Minimum Value</label>
+    <div class="qedField" data-dojo-type="dijit/form/NumberTextBox" name="min"></div>
+  </div>
+  <div>
+    <label class="qedLabel" for="max">Maximum Value</label>
+    <div class="qedField" data-dojo-type="dijit/form/NumberTextBox" name="max"></div>
+  </div>
+  <div>
+    <label class="qedLabel" for="places">Decimal Places</label>
+    <div class="qedField" data-dojo-type="dijit/form/NumberTextBox" data-dojo-props="constraints:{ min: 0 }" name="places"></div>
+  </div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/NumberInputWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/NumberInputWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/NumberInputWidget.html	(revision 441)
@@ -0,0 +1,4 @@
+<div>
+  <p>${text}</p>
+  <div class="qedField" data-dojo-attach-point="numberBox" data-dojo-type="dijit/form/NumberTextBox" name="text"></div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/ScaleInputConfigRowWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/ScaleInputConfigRowWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/ScaleInputConfigRowWidget.html	(revision 441)
@@ -0,0 +1,38 @@
+<tr>
+  <th class="item">
+    <div name="text"
+         required="required"
+         data-dojo-type="dijit/form/ValidationTextBox"
+         data-dojo-props="placeholder: 'Item/Question text'"></div>
+  </th>
+  <th class="min">
+    <div name="minLabel"
+         required="required"
+         data-dojo-type="dijit/form/TextBox"
+         data-dojo-props="placeholder: 'Minimum label'"></div>
+  </th>
+  <td>
+    <div disabled="disabled"
+         data-dojo-type="dijit/form/RadioButton"></div>
+  </td>
+  <td>...</td>
+  <td>
+    <div disabled="disabled"
+         data-dojo-type="dijit/form/RadioButton"></div>
+  </td>
+  <th class="max">
+    <div name="maxLabel"
+         required="required"
+         data-dojo-type="dijit/form/TextBox"
+         data-dojo-props="placeholder: 'Maximum label'"></div>
+  </th>
+  <td class="na">
+    <div disabled="disabled"
+         data-dojo-attach-point="naRadioButton"
+         data-dojo-type="dijit/form/RadioButton"></div>
+  </td>
+  <th>
+    <button data-dojo-type="dijit/form/Button"
+            data-dojo-attach-event="onClick:onDestroy">X</button>
+  </th>
+</tr>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/ScaleInputConfigWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/ScaleInputConfigWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/ScaleInputConfigWidget.html	(revision 441)
@@ -0,0 +1,48 @@
+<div class="${baseClass}">
+  <table>
+    <thead>
+      <tr>
+        <th class="item"></th>
+        <th data-dojo-attach-point="minLabelNode"
+            class="min">
+          <div name="minLabel"
+               data-dojo-type="dijit/form/TextBox"
+               data-dojo-props="placeholder: 'Minimum label'"></div>
+        </th>
+        <th data-dojo-attach-point="minNode">
+          <div name="min"
+               data-dojo-type="dijit/form/NumberTextBox"
+               data-dojo-props="required: true, placeholder: 'Minimum value'"></div>
+        </th>
+        <th>...</th>
+        <th data-dojo-attach-point="maxNode">
+          <div name="max"
+               data-dojo-type="dijit/form/NumberTextBox"
+               data-dojo-props="required: true, placeholder: 'Maximum value'"></div>
+        </th>
+        <th data-dojo-attach-point="maxLabelNode" class="max">
+          <div name="maxLabel"
+               data-dojo-type="dijit/form/TextBox"
+               data-dojo-props="placeholder: 'Maximum label'"></div>
+        </th>
+        <th class="na">
+          <div name="naLabel"
+               data-dojo-attach-point="naTextBox"
+               data-dojo-attach-event="onChange: onNAChange"
+               data-dojo-type="dijit/form/TextBox"
+               data-dojo-props="placeholder: 'N/A label', intermediateChanges: true"></div>
+        </th>
+      </tr>
+    </thead>
+    <tbody data-dojo-attach-point="itemsNode">
+    </tbody>
+    <tbody>
+      <tr>
+        <td class="item">
+          <button data-dojo-type="dijit/form/Button"
+                  data-dojo-attach-event="onClick:onAddNewItem">Click to add item</button>
+        </td>
+      </tr>
+    </tbody>
+  </table>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/ScaleInputWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/ScaleInputWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/ScaleInputWidget.html	(revision 441)
@@ -0,0 +1,14 @@
+<div class="${baseClass}">
+  <table>
+    <thead>
+      <tr>
+        <th class="item"></th>
+        <th data-dojo-attach-point="minNode" class="min"></th>
+        <th data-dojo-attach-point="maxNode" class="max"></th>
+        <th class="na" data-dojo-attach-point="naNode"></th>
+      </tr>
+    </thead>
+    <tbody data-dojo-attach-point="itemsNode">
+    </tbody>
+  </table>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/StringInputConfigWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/StringInputConfigWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/StringInputConfigWidget.html	(revision 441)
@@ -0,0 +1,4 @@
+<div>
+  <label class="qedLabel" for="text">Item/Question Text</label>
+  <div class="qedField" data-dojo-attach-point="textBox" data-dojo-type="dijit/form/TextBox" data-dojo-props="placeholder: 'Item/Question Text'" name="text"></div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/StringInputWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/StringInputWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/StringInputWidget.html	(revision 441)
@@ -0,0 +1,4 @@
+<div>
+  <p>${text}</p>
+  <div data-dojo-attach-point="textBox" data-dojo-type="dijit/form/TextBox" name="text"></div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/TextConfigWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/TextConfigWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/TextConfigWidget.html	(revision 441)
@@ -0,0 +1,4 @@
+<div>
+  <label for="text" class="qedLabel">Text</label>
+  <textarea class="qedField" data-dojo-type="dijit/form/Textarea" name="text"></textarea>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/TextInputConfigWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/TextInputConfigWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/TextInputConfigWidget.html	(revision 441)
@@ -0,0 +1,10 @@
+<div>
+  <div>
+    <label class="qedLabel" for="text">Item/Question Text</label>
+    <div class="qedField" data-dojo-type="dijit/form/TextBox" data-dojo-props="placeholder: 'Item/Question Text'" name="text"></div>
+  </div>
+  <div>
+    <label class="qedLabel" for="maxLength">Maximum Length</label>
+    <div class="qedField" data-dojo-type="dijit/form/NumberTextBox" data-dojo-props="placeholder: 'Maximum length', constraints: { min: 0 }" name="maxLength"></div>
+  </div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/TextInputWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/TextInputWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/TextInputWidget.html	(revision 441)
@@ -0,0 +1,4 @@
+<div>
+  <p>${text}</p>
+  <div class="qedField" data-dojo-attach-point="textArea" data-dojo-type="dijit/form/Textarea" name="text"></div>
+</div>
Index: /Dev/trunk/client/qed/model/widgets/questions/templates/TextWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/questions/templates/TextWidget.html	(revision 441)
+++ /Dev/trunk/client/qed/model/widgets/questions/templates/TextWidget.html	(revision 441)
@@ -0,0 +1,1 @@
+<p>${text}</p>
Index: v/trunk/client/qed/model/widgets/templates/ScaleInputConfigRowWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/templates/ScaleInputConfigRowWidget.html	(revision 440)
+++ 	(revision )
@@ -1,38 +1,0 @@
-<tr>
-  <th class="item">
-    <div name="text"
-         required="required"
-         data-dojo-type="dijit/form/ValidationTextBox"
-         data-dojo-props="placeholder: 'Item/Question text'"></div>
-  </th>
-  <th class="min">
-    <div name="minLabel"
-         required="required"
-         data-dojo-type="dijit/form/TextBox"
-         data-dojo-props="placeholder: 'Minimum label'"></div>
-  </th>
-  <td>
-    <div disabled="disabled"
-         data-dojo-type="dijit/form/RadioButton"></div>
-  </td>
-  <td>...</td>
-  <td>
-    <div disabled="disabled"
-         data-dojo-type="dijit/form/RadioButton"></div>
-  </td>
-  <th class="max">
-    <div name="maxLabel"
-         required="required"
-         data-dojo-type="dijit/form/TextBox"
-         data-dojo-props="placeholder: 'Maximum label'"></div>
-  </th>
-  <td class="na">
-    <div disabled="disabled"
-         data-dojo-attach-point="naRadioButton"
-         data-dojo-type="dijit/form/RadioButton"></div>
-  </td>
-  <th>
-    <button data-dojo-type="dijit/form/Button"
-            data-dojo-attach-event="onClick:onDestroy">X</button>
-  </th>
-</tr>
Index: v/trunk/client/qed/model/widgets/templates/ScaleInputConfigWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/templates/ScaleInputConfigWidget.html	(revision 440)
+++ 	(revision )
@@ -1,48 +1,0 @@
-<div class="${baseClass}">
-  <table>
-    <thead>
-      <tr>
-        <th class="item"></th>
-        <th data-dojo-attach-point="minLabelNode"
-            class="min">
-          <div name="minLabel"
-               data-dojo-type="dijit/form/TextBox"
-               data-dojo-props="placeholder: 'Minimum label'"></div>
-        </th>
-        <th data-dojo-attach-point="minNode">
-          <div name="min"
-               data-dojo-type="dijit/form/NumberTextBox"
-               data-dojo-props="required: true, placeholder: 'Minimum value'"></div>
-        </th>
-        <th>...</th>
-        <th data-dojo-attach-point="maxNode">
-          <div name="max"
-               data-dojo-type="dijit/form/NumberTextBox"
-               data-dojo-props="required: true, placeholder: 'Maximum value'"></div>
-        </th>
-        <th data-dojo-attach-point="maxLabelNode" class="max">
-          <div name="maxLabel"
-               data-dojo-type="dijit/form/TextBox"
-               data-dojo-props="placeholder: 'Maximum label'"></div>
-        </th>
-        <th class="na">
-          <div name="naLabel"
-               data-dojo-attach-point="naTextBox"
-               data-dojo-attach-event="onChange: onNAChange"
-               data-dojo-type="dijit/form/TextBox"
-               data-dojo-props="placeholder: 'N/A label', intermediateChanges: true"></div>
-        </th>
-      </tr>
-    </thead>
-    <tbody data-dojo-attach-point="itemsNode">
-    </tbody>
-    <tbody>
-      <tr>
-        <td class="item">
-          <button data-dojo-type="dijit/form/Button"
-                  data-dojo-attach-event="onClick:onAddItem">Click to add item</button>
-        </td>
-      </tr>
-    </tbody>
-  </table>
-</div>
Index: v/trunk/client/qed/model/widgets/templates/ScaleInputWidget.html
===================================================================
--- /Dev/trunk/client/qed/model/widgets/templates/ScaleInputWidget.html	(revision 440)
+++ 	(revision )
@@ -1,14 +1,0 @@
-<div class="${baseClass}">
-  <table>
-    <thead>
-      <tr>
-        <th class="item"></th>
-        <th data-dojo-attach-point="minNode" class="min"></th>
-        <th data-dojo-attach-point="maxNode" class="max"></th>
-        <th class="na" data-dojo-attach-point="naNode"></th>
-      </tr>
-    </thead>
-    <tbody data-dojo-attach-point="itemsNode">
-    </tbody>
-  </table>
-</div>
Index: /Dev/trunk/client/qed/pages/question.js
===================================================================
--- /Dev/trunk/client/qed/pages/question.js	(revision 440)
+++ /Dev/trunk/client/qed/pages/question.js	(revision 441)
@@ -42,16 +42,18 @@
         _refresh: function () {
             this.titleNode.innerHTML = Question.DisplayTitle.get(this.question);
-            this._toolkit.set('value',this.question);
-            this._preview.appendItems(Question.Content.get(this.question));
+            this._toolkit.set('value', this.question);
+            this._preview.set('value', Question.Content.get(this.question));
         },
         _onSave: function(evt) {
-            lang.mixin(this.question, this._toolkit.get('value'));
-            Question.Content.set(this.question, this._preview.getItems());
-            store.put(this.question)
-            .then(function() {
-                Router.go('/questions');
-            },function(err){
-                Content.notify(err,'error');
-            });
+            if ( this._preview.validate() ) {
+                lang.mixin(this.question, this._toolkit.get('value'));
+                Question.Content.set(this.question, this._preview.get('value'));
+                store.put(this.question)
+                .then(function() {
+                    Router.go('/questions');
+                },function(err){
+                    Content.notify(err,'error');
+                });
+            }
             if ( evt ) { event.stop( evt ); }
             return false;
@@ -68,7 +70,10 @@
 
             this._preview = new QuestionEditorPreview({ 
-            },this.QuestionEditorPreviewNode);
+                name: 'content',
+                delay: 5,
+                region: 'center'
+            });
             this._preview.startup();
-            this._supportingWidgets.push(this._toolkit, this._preview);
+            this.addChild(this._preview);
         }
     });
Index: /Dev/trunk/client/qed/pages/session.js
===================================================================
--- /Dev/trunk/client/qed/pages/session.js	(revision 440)
+++ /Dev/trunk/client/qed/pages/session.js	(revision 441)
@@ -51,6 +51,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);
+            this.session.accounts = array.map(this._accountList.get('value'),
+                                              function(item){
+                                                  return store.getIdentity(item);
             });
             store.put(this.session)
@@ -71,9 +72,8 @@
         },
         _setupAccountList: function() {
-            this._accountList = new AccountListView().placeAt(this.accountListNode);
+            this._accountList = new AccountListView({
+                value: this.session.accounts
+            }).placeAt(this.accountListNode);
             this._accountList.startup();
-            for (var account in this.session.accounts) {
-                this._accountList.insertItem(this.session.accounts[account]);
-            }
         },
         _setupAutoComplete: function() {
Index: /Dev/trunk/client/qed/pages/survey.js
===================================================================
--- /Dev/trunk/client/qed/pages/survey.js	(revision 440)
+++ /Dev/trunk/client/qed/pages/survey.js	(revision 441)
@@ -55,5 +55,6 @@
         _setupListView: function() {
             this.questionList = new QuestionListView({
-                region: 'center'
+                region: 'center',
+                name: 'questions'
             },this.surveyListViewNode);
             this.questionList.startup();
@@ -67,6 +68,6 @@
                 .then(lang.hitch(this,function(survey){
                     this.survey = survey;
-                    array.forEach(Survey.Questions.get(this.survey),
-                        lang.hitch(this.questionList,'appendItem'));
+                    this.questionList.set('value',
+                                          Survey.Questions.get(this.survey));
                     this.refresh();
                 }));
@@ -74,5 +75,5 @@
         },
         _includeQuestion: function(question) {
-            this.questionList.insertItem(question);
+            this.questionList.appendItem(question);
         },
         refresh: function() {
@@ -97,5 +98,5 @@
         },
         _onSave: function(evt) {
-            this.survey.questions = this.questionList.getItems();
+            this.survey.questions = this.questionList.get('value');
             store.put(this.survey)
             .then(function() { 
Index: /Dev/trunk/client/qed/pages/templates/question.html
===================================================================
--- /Dev/trunk/client/qed/pages/templates/question.html	(revision 440)
+++ /Dev/trunk/client/qed/pages/templates/question.html	(revision 441)
@@ -15,6 +15,3 @@
         </div>
     </div>
-    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">
-        <div data-dojo-attach-point="QuestionEditorPreviewNode"></div>
-    </div>
 </div>
Index: /Dev/trunk/client/qed/stddeps.js
===================================================================
--- /Dev/trunk/client/qed/stddeps.js	(revision 440)
+++ /Dev/trunk/client/qed/stddeps.js	(revision 441)
@@ -28,5 +28,4 @@
 
     'qed/model/widgets/AccountListView',
-    'qed/model/widgets/QuestionWidget',
     'qed/model/widgets/SurveyFieldset',
     'qed/model/widgets/SurveyRunFieldset',
@@ -41,6 +40,4 @@
     'qed/widgets/ObjectBox',
     'qed/widgets/Selector',
-    'qed/widgets/TitleGroup',
-    'qed/widgets/list/List',
-    'qed/widgets/list/OrderedList'
+    'qed/widgets/TitleGroup'
 ],function(){});
Index: /Dev/trunk/client/qed/store.js
===================================================================
--- /Dev/trunk/client/qed/store.js	(revision 440)
+++ /Dev/trunk/client/qed/store.js	(revision 441)
@@ -9,5 +9,5 @@
     
     var couchStore = new CouchStore({
-        target: 'data/couch/',
+        target: 'data/couch/' /*,
         validate: function(object) {
             var result = jsonSchema.validate(object,schema);
@@ -18,5 +18,5 @@
                 return false;
             }
-        }
+        }*/
     });
     var memoryStore = new Memory({
Index: /Dev/trunk/client/qed/tests/test_ScaleWidget.html
===================================================================
--- /Dev/trunk/client/qed/tests/test_ScaleWidget.html	(revision 440)
+++ /Dev/trunk/client/qed/tests/test_ScaleWidget.html	(revision 441)
@@ -14,6 +14,6 @@
           'dojo/when',
           'dojo/parser',
-          'qed/model/widgets/ScaleInputConfigWidget',
-          'qed/model/widgets/ScaleInputWidget',
+          'qed/model/widgets/questions/ScaleInputConfigWidget',
+          'qed/model/widgets/questions/ScaleInputWidget',
           'dojo/domReady!'
       ], function(registry,dom,when,parser,ScaleInputConfigWidget,ScaleInputWidget){
@@ -73,5 +73,5 @@
       <div>
         <div id="configWidget"
-             data-dojo-type="qed/model/widgets/ScaleInputConfigWidget"></div>
+             data-dojo-type="qed/model/widgets/questions/ScaleInputConfigWidget"></div>
         <button id="defaultConfigButton"
                 data-dojo-type="dijit/form/Button">Set Example</button>
Index: /Dev/trunk/client/qed/widgets/ListWidget.js
===================================================================
--- /Dev/trunk/client/qed/widgets/ListWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/widgets/ListWidget.js	(revision 441)
@@ -0,0 +1,135 @@
+define([
+    "dijit/_Container",
+    "dijit/_WidgetBase",
+    "dijit/registry",
+    "dojo/_base/array",
+    "dojo/_base/declare",
+    "dojo/_base/lang",
+    "dojo/dnd/Source",
+    "dojo/dnd/common",
+    "dojo/dom-construct"
+], function(_Container, _WidgetBase, registry, array, declare, lang, Source, dnd, domConstruct) {
+    return declare([_WidgetBase,_Container],{
+        name: "",
+        value: null,
+        multiple: true,
+        type: "text",
+        /* container : dojo/dnd/Container or subclass
+         * determine which container to use for the list
+         */
+        container: Source,
+        buildRendering: function() {
+            this.inherited(arguments);
+
+            var sourceParams = {};
+            var paramsToInherit = [
+                "singular",
+                "creator",
+                "skipForm",
+                "dropParent",
+                "isSource",
+                "autoSync",
+                "copyOnly",
+                "delay",
+                "horizontal",
+                "selfCopy",
+                "selfAccept",
+                "withHandles",
+                "generateText"
+            ];
+            array.forEach(paramsToInherit, function(param){
+                if ( typeof this[param] !== "undefined" ) {
+                    sourceParams[param] = this[param];
+                }
+            },this);
+            lang.mixin(sourceParams, {
+                accept: [this.type],
+                creator: lang.hitch(this, "creator"),
+                dropParent: this.containerNode
+            });
+            this.source = new this.container(this.domNode,sourceParams);
+        },
+        creator: function(item, hint) {
+            var id = dnd.getUniqueId();
+            var nodeOrWidget = null;
+            if ( hint === "avatar" ) {
+                if ( this.createAvatar ) {
+                    nodeOrWidget = this.createAvatar(id,item);
+                } else {
+                    return this.source.defaultCreator(item, hint);
+                }
+            } else {
+                if ( this.createListElement ) {
+                    nodeOrWidget = this.createListElement(id,item);
+                } else {
+                    return this.source.defaultCreator(item, hint);
+                }
+            }
+            var node = nodeOrWidget.domNode ? nodeOrWidget.domNode : nodeOrWidget;
+            if ( hint !== "avatar" && node.id !== id ) {
+                console.warn("Node id '%s' not equal to generated id '%s'. Is this intended?", node.id, id);
+            }
+            return {
+                data: item,
+                type: [this.type],
+                node: node
+            };
+        },
+        createAvatar: null, /*function(id,item){},*/
+        createListElement: null, /* function(id,item){},*/
+        _getValueAttr: function() {
+            return array.map(this.source.getAllNodes(),function(node){
+                var widget = registry.byNode(node);
+                if ( widget && "value" in widget ) {
+                    return widget.get('value');
+                } else {
+                    return this.source.getItem(node.id).data;
+                }
+            },this);
+        },
+        _setValueAttr: function(value) {
+            this.clear();
+            this.appendItems(value);
+        },
+        appendItems: function(items) {
+            this.source.insertNodes(false,items);
+        },
+        appendItem: function(item) {
+            this.source.insertNodes(false,[item]);
+        },
+        removeItem: function(key) {
+            array.forEach(array.filter(this.source.getAllNodes(), function(node){
+                return node.id === key;
+            }), lang.hitch(this, "_destroyNodeOrWidget"));
+            this.source.delItem(key);
+        },
+        getChildren: function() {
+            return array.filter(array.map(this.source.getAllNodes(), function(node){
+                return registry.byNode(node);
+            }),function(widget){ return widget !== null; });
+        },
+        clear: function() {
+            array.forEach(this.source.getAllNodes(),
+                          lang.hitch(this, "_destroyNodeOrWidget"));
+            this.source.clearItems();
+        },
+        _destroyNodeOrWidget: function(node) {
+            var widget = registry.byNode(node);
+            if ( widget ) {
+                widget.destroyRecursive();
+            } else {
+                domConstruct.destroy(node);
+            }
+        },
+        validate: function() {
+            return array.every(array.map(this.source.getAllNodes(),function(node){
+                var widget = registry.byNode(node);
+                return !widget || widget.disabled || !widget.validate || widget.validate();
+            }), function(item){ return item; });
+        },
+        destroy: function() {
+            this.source.destroy();
+            this.inherited(arguments);
+        }
+    });
+});
Index: /Dev/trunk/client/qed/widgets/_ComplexValueMixin.js
===================================================================
--- /Dev/trunk/client/qed/widgets/_ComplexValueMixin.js	(revision 441)
+++ /Dev/trunk/client/qed/widgets/_ComplexValueMixin.js	(revision 441)
@@ -0,0 +1,31 @@
+define([
+    "dijit/_Container",
+    "dijit/form/_FormMixin",
+    "dojo/_base/array",
+    "dojo/_base/declare"
+], function(_Container, _FormMixin, array, declare) {
+    return declare([_Container,_FormMixin],{
+        name: "",
+        value: null,
+        disabled: false,
+        readOnly: false,
+        _setDisabledAttr: function(value) {
+            this._set("disabled", value);
+            array.forEach(this._getDescendantFormWidgets(), function(child){
+                child.set("disabled", value);
+            });
+        },
+        _setReadOnlyAttr: function(value) {
+            this._set("readOnly", value);
+            array.forEach(this._getDescendantFormWidgets(), function(child){
+                child.set("readOnly", value);
+            });
+        },
+        focus: function() {
+            var children = this._getDescendantFormWidgets();
+            if ( children.length > 0 ) {
+                children[0].focus();
+            }
+        }
+    });
+});
Index: /Dev/trunk/client/qed/widgets/_ComplexValueWidget.js
===================================================================
--- /Dev/trunk/client/qed/widgets/_ComplexValueWidget.js	(revision 441)
+++ /Dev/trunk/client/qed/widgets/_ComplexValueWidget.js	(revision 441)
@@ -0,0 +1,10 @@
+define([
+    "./_ComplexValueMixin",
+    "dijit/_TemplatedMixin",
+    "dijit/_WidgetBase",
+    "dijit/_WidgetsInTemplateMixin",
+    "dojo/_base/declare"
+], function(_ComplexValueMixin, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, declare) {
+    return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_ComplexValueMixin],{
+    });
+});
