{
    xtype: 'container',

    border: false,

    layout: "fit",

    bodyStyle: 'background-image: none;',

    title: "Selection with check boxes a group of data",

    isDirty: function() {

        var i_cmp = this;
        var i_tree = i_cmp.treeSelector;
        var b_dirty = i_tree.isDirty();

        return b_dirty;
    },

    onInitialize: function(widget, owner) {

        var serviceUrl = '/wsh-services/wshproxy.aspx';

        widget.treeSelector = Ext.create('Ext.ux.folderorganizer.TreeSelector', {
            dmd: 'webshop.dmd',
            entity: 'WSHFLDET00',
            xpd: 'folder.xpd',
            proxy: serviceUrl,
            cid: {
                root: 50,
                child: 56
            },
            omitCid: 56,
            addToAllChildren: {
                allow: true,
                warning: true,
                multiChoiceDialog: {
                    title: { da: 'Sæt flueben', en: 'Check checkboxes' },
                    questions: [
                        { da: 'Kun på denne række', en: 'Check only on this row' },
                        { da: 'På alle underliggende rækker', en: 'Check all rows below this' },
                        { da: 'Fortryd denne funktion', en: 'Cancel this operation' }
                    ],
                    guideLine: { da: 'Hvor skal der sættes flueben ?', en: 'Where to set check marks ?' }
                }
            },
            wrapper: owner
        });

        widget.relayEvents(widget.treeSelector, ['savecomplete']);

        widget.add(this.treeSelector);
    },

    doSave: function(f_callback) {

        // console.log('Admin/Resources/widgets/ItemToParent.widget: On doSave fire the callback when saving is done! Meaning this.treeSelector has to have a callback or an event!');

        this.treeSelector.doSave();

        f_callback && f_callback();
    },

    doDelete: function(f_callback) {

        // console.log('Admin/Resources/widgets/ItemToParent.widget: On doDelete fire the callback when deleting is done! Meaning this.treeSelector has to have a callback or an event!');

        this.treeSelector.doDelete();

        f_callback && f_callback();
    }
}
