Ignore:
Timestamp:
09/03/12 18:14:37 (13 years ago)
Author:
hendrikvanantwerpen
Message:

Lots of small fixes.

Make it possible to read survey answers (when a question code is
provided), it is now displayed in place of the survey. More to come.

Some whitespace fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js

    r404 r406  
    1818],function(array, declare, lang, domConstruct, _TemplatedMixin, _WidgetBase, _Container, Button, CheckBox, NumberSpinner, RadioButton, Textarea, TextBox, TableContainer, _EditableListMixin, OrderedList) {
    1919    var factory = declare('rft.ui.content.ContentWidgetFactory', [], {
    20         /* No default type, all should be valid */
    2120        createViewWidget: function(/*Object*/options) {
    2221            // options: Object
     
    151150        _textBox: null,
    152151        postCreate: function() {
    153             this._textBox = new TextBox();
     152            this._textBox = new TextBox({
     153                name: this.options.code || ''
     154            });
    154155            this.addChild(this._textBox);
    155156            this._textBox.startup();
     
    197198        _textArea: null,
    198199        postCreate: function() {
    199             this._textArea = new Textarea();
     200            this._textArea = new Textarea({
     201                name: this.options.code
     202            });
    200203            this._textArea.set('maxLength', this.options.maxLength || 1000);
    201204            this._textArea.set('value', this.options.defaultValue || "");
     
    256259        postCreate: function() {
    257260            this._numberInput = new NumberSpinner({
     261                name: this.options.code || '',
    258262                constraints: {
    259263                    min: this.options.min,
     
    333337
    334338            var ctor = this.options.multiple === true ? CheckBox : RadioButton;
    335             array.forEach(this.options.items ,function(item){
     339            array.forEach(this.options.items || [],function(item){
    336340                table.addChild(new ctor({
     341                        name: this.options.code || '',
    337342                        title: item
    338343                }));
Note: See TracChangeset for help on using the changeset viewer.