Index: /Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js	(revision 393)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js	(revision 394)
@@ -7,8 +7,9 @@
     'dijit/form/Textarea',
     'dijit/form/TextBox',
+    'dijit/form/CheckBox',
     'dijit/layout/StackContainer',
     'dojox/form/CheckedMultiSelect',
     'dojox/layout/TableContainer'
-    ],function(declare, lang, _WidgetBase, _Container, NumberSpinner, Textarea, TextBox, StackContainer, CheckedMultiSelect, TableContainer) {
+    ],function(declare, lang, _WidgetBase, _Container, NumberSpinner, Textarea, TextBox, CheckBox, StackContainer, CheckedMultiSelect, TableContainer) {
         var factory = declare('rft.ui.content.ContentWidgetFactory', [], {
             /* No default type, all should be valid */
@@ -48,10 +49,10 @@
 
             createFreeTextInputViewWidget: function(options) {
-                return new FreeTextInputViewItem({
+                return new FreeTextViewItem({
                     options: options
                 });
             },
             createFreeTextInputEditWidget: function() {
-                return new FreeTextInputEditItem();
+                return new FreeTextEditItem();
             }/*,
 
@@ -143,22 +144,53 @@
 
         /* Inputs */
-        var FreeTextViewItem = declare(Textarea, {
-            postCreate: function() {
-                this.set('value', this.options.defaultValue);
-                this.set('readOnly', this.options.readOnly);
-                this._onBlur = undefined;
-            },
-            _getValueAttr: function() {
-                return { type: "FreeText",
+        var FreeTextViewItem = declare([_WidgetBase, _Container], {
+            _textArea: null,
+            postCreate: function() {
+                this._textArea = new Textarea();
+                this._textArea.set('maxLength', this.options.maxLength || 1000);
+                this._textArea.set('readOnly', this.options.readOnly || false);
+                this._textArea.set('value', this.options.defaultValue || "");
+                this.addChild(this._textArea);
+            },
+            _getValueAttr: function() {
+                return { type: "FreeTextInput",
                          defaultValue: this.options.defaultValue,
-                         readOnly: this.options.readOnly
-                };
-            }
-        });
-
-        var FreeTextEditItem = declare(Textarea, {
+                         readOnly: this.options.readOnly,
+                         maxLength: this.options.maxLength
+                };
+            }
+        });
+
+        var FreeTextEditItem = declare(StackContainer, {
+            _propertiesTable: null,
+            _maxLength: null, _readOnly: null, _defaultValue: null,
+
+
+            postCreate: function() {
+                this._textArea = new Textarea();
+                this._propertiesTable = new TableContainer({ cols: 1, customClass: "labelsAndValues"} );
+                this._maxLength = new NumberSpinner( { title: "Maximum length", constraints: {min:0}} );
+                this._readOnly = new CheckBox( { title: "Read only" } );
+                this._defaultValue = new Textarea( { title: "Default value" });
+                this._propertiesTable.addChild(this._maxLength);
+                this._propertiesTable.addChild(this._readOnly);
+                this._propertiesTable.addChild(this._defaultValue);
+                this.addChild(this._propertiesTable);
+            },
+
             _setValueAttr: function(value) {
-                this.inherited(arguments, [value])
-            }
+                this._maxLength.set('value', value.maxLength);
+                this._readOnly.set('value', value.readOnly);
+                this._defaultValue.set('value', value.defaultValue);
+            },
+            _getValueAttr: function() {
+                return { type: "FreeTextInput", 
+                         defaultValue: this._defaultValue.get('value'),
+                         readOnly: this._readOnly.get('value'),
+                         maxLength: this._maxLength.get('value')
+                };
+            }
+
+
         })
 
