Sha256: 7ab7620669fb22f96a46bac1dc88ddfe681e3233a7c8215be0bcbe009e1f7ece

Contents?: true

Size: 1000 Bytes

Versions: 6

Compression:

Stored size: 1000 Bytes

Contents

Ext.define('FastUI.view.vfield.VSingleChoice', {
    extend:'Ext.form.field.ComboBox',
    requires:['FastUI.store.MListMgr'],
    valueObject: {},
    winCtx:{},
    winId:0,
    rest:{},

    valueField:'name',
    displayField:"title",
    forceSelection:true,
    triggerAction:'all',
    editable:false,
    selectOnFocus:true,

    initComponent:function () {
        this.fieldLabel = this.getFValue('title');
        this.name =  this.rest.getTableName() + '[' + this.getFValue('name') + ']';
        this.disabled = this.getFValue('readonly');
        this.allowBlank = true;
        this.store = FastUI.store.MListMgr.getStore(this.getFValue('name'));
        this.callParent();
    },
    getFValue:function (key) {
        return this.valueObject[key];
    },
    setValue:function (value) {
        if(value && value.name && value.title){
            this.setValue(value.name);
        }else{
            this.callParent(arguments);
        }
    }

});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fastui-0.1.8 app/assets/javascripts/fastui/app/view/vfield/VSingleChoice.js
fastui-0.1.7 app/assets/javascripts/fastui/app/view/vfield/VSingleChoice.js
fastui-0.1.6 app/assets/javascripts/fastui/app/view/vfield/VSingleChoice.js
fastui-0.1.4 app/assets/javascripts/fastui/app/view/vfield/VSingleChoice.js
fastui-0.1.3 app/assets/javascripts/fastui/app/view/vfield/VSingleChoice.js
fastui-0.1.2 app/assets/javascripts/fastui/app/view/vfield/VSingleChoice.js