<commit_before>Ext4.define('Kwf.Ext4.Controller.Form', {
    mixins: {
        observable: 'Ext.util.Observable'
    },
    autoLoadComboBoxStores: true,

    form: null,

    constructor: function(config) {
        this.mixins.observable.constructor.call(this, config);
        this.init();
    },

    init: function()
    {
        if (!this.form) Ext4.Error.raise('form config is required');
        if (!this.form instanceof Ext4.form.Panel) Ext4.Error.raise('form config needs to be a Ext.form.Panel');

        var form = this.form;
        if (typeof this.saveButton == 'undefined') this.saveButton = form.down('button#save');
        if (this.saveButton && !this.saveButton instanceof Ext4.button.Button) Ext4.Error.raise('saveButton config needs to be a Ext.button.Button');
        if (this.saveButton) {
            this.saveButton.on('click', this.onSaveClick, this);
        }
    },

    load: function(row)
    {
        if (this.autoLoadComboBoxStores) {
            Ext4.each(this.form.query("combobox"), function(i) {
                if (i.queryMode == 'remote' && i.store && !i.store.lastOptions) {
                    i.store.load();
                }
            }, this);
        }<commit_msg>Ext4 Form: also load multiselectfield store on load, like for combobox<commit_after>Ext4.define('Kwf.Ext4.Controller.Form', {
    mixins: {
        observable: 'Ext.util.Observable'
    },
    autoLoadComboBoxStores: true,

    form: null,

    constructor: function(config) {
        this.mixins.observable.constructor.call(this, config);
        this.init();
    },

    init: function()
    {
        if (!this.form) Ext4.Error.raise('form config is required');
        if (!this.form instanceof Ext4.form.Panel) Ext4.Error.raise('form config needs to be a Ext.form.Panel');

        var form = this.form;
        if (typeof this.saveButton == 'undefined') this.saveButton = form.down('button#save');
        if (this.saveButton && !this.saveButton instanceof Ext4.button.Button) Ext4.Error.raise('saveButton config needs to be a Ext.button.Button');
        if (this.saveButton) {
            this.saveButton.on('click', this.onSaveClick, this);
        }
    },

    load: function(row)
    {
        if (this.autoLoadComboBoxStores) {
            Ext4.each(this.form.query("combobox"), function(i) {
                if (i.queryMode == 'remote' && i.store && !i.store.lastOptions) {
                    i.store.load();
                }
            }, this);
            Ext4.each(this.form.query('multiselectfield'), function(i) {
                if (i.store && !i.store.lastOptions) {
                    i.store.load();
                }
            }, this);
        }
{'fraction_non_alphanumeric': 0.1414779056813962, 'fraction_numerical': 0.006683995544002971, 'mean_word_length': 2.1582649472450175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4307207', 'n_tokens_mistral': 832, 'n_tokens_neox': 802, 'n_words': 159}