1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    33
    Answers
    3
    Vote Rating
    1
    Forn is on a distinguished road

      0  

    Default Unanswered: Modal window from other modal: TypeError: alignToEl is null

    Unanswered: Modal window from other modal: TypeError: alignToEl is null


    Hello.

    I have the one modal window with fomr on it, and open other one from it with another form.

    If the second form have NOT any component - it\s open clear from norm. If I add the component to it (hidden field) i get the next error:
    Code:
    TypeError: alignToEl is null
    
    
    [IMG]chrome://firebug/content/blank.gif[/IMG] alignToElPosition = alignToEl.getAnchorXY(align2, false);
    Main window:
    PHP Code:
    Ext.define('WebAdmin.view.forms.FormCompendiumTown', {
        
    extend'Ext.window.Window',
        
    alias'widget.formCompendiumTown',
        
        
    width800,
        
    height520,
        
    layout'fit',
        
    resizablefalse,
        
    modaltrue,
        
    maximizablefalse,
        
    closabletrue,
        
    closeAction'destroy',
        
    borderfalse,
        
    bodyBorderfalse,
        
        
    tabId'',
        
    actionCode'',
        
        
    setTabId: function(tabIdForSet) {
            
    this.tabId tabIdForSet;
        },
        
    setActionCode: function(actionCodeForSet) {
            
    this.actionCode actionCodeForSet;
        },
        
        
    listeners: {
            
    beforeclose: {
                
    fn: function(){
                    if (
    this.down('form').down('#formErrorState').tip){
                        
    this.down('form').down('#formErrorState').tip.hide();
                    }
                }
            },
            
    beforehide: {
                
    fn: function(){
                    if (
    this.down('form').down('#formErrorState').tip){
                        
    this.down('form').down('#formErrorState').tip.hide();
                    }
                }
            }
        },
        
        
    initComponent: function() {
            var 
    me this;

            
    Ext.applyIf(me, {
                
    items: [{
                    
    xtype'form',
                    
    frametrue,
                    
    autoScrolltrue,
                    
    bodyPadding10,
                    
    bodyBordertrue,
                    
                    
    defaults: {
                        
    anchor'100%'
                    
    },

                    
    fieldDefaults: {
                        
    labelAlign'left',
                        
    labelWidth150,
                        
    labelStyle'font-weight:bold',
                        
    msgTarget'none',
                        
    invalidCls''
                    
    },
                    
                    
    listeners: {
                        
    fieldvaliditychange: function() {
                            
    this.updateErrorState();
                        },
                        
    fielderrorchange: function() {
                            
    this.updateErrorState();
                        }
                    },
                    
                    
    updateErrorState: function() {
                        var 
    me this,
                            
    errorCmpfieldserrors;
                        if (
    me.hasBeenDirty || me.getForm().isDirty()) { //prevents showing global error when form first loads
                            
    errorCmp me.down('#formErrorState');
                            
    fields me.getForm().getFields();
                            
    errors = [];
                            
    fields.each(function(field) {
                                
    Ext.Array.forEach(field.getErrors(), function(error) {
                                    
    errors.push({namefield.getFieldLabel(), errorerror});
                                });
                            });
                            
    errorCmp.setErrors(errors);
                            
    me.hasBeenDirty true;
                        }
                    },

                    
    items: [{
                        
    xtype'tabpanel',
                        
    borderfalse,
                        
    items: [{
                            
    title'Основные настройки',
                            
    frametrue,
                            
    items: [{
                                        
    xtype'numberfield',
                                        
    name'id',
                                        
    fieldLabel'ID',
                                        
    afterLabelTextTplrequired,
                                        
    allowBlankfalse,
                                        
    maxValue2147483647,
                                        
    maxLength9
                                    
    },{
                                        
    xtype'combobox',
                                        
    name'parentId',
                                        
    store'WebAdmin.store.DSCompendiumTownForCombo',
                                        
    fieldLabel'Родительский город',
                                        
    allowBlanktrue,
                                        
    displayField'name',
                                        
    valueField'id',
                                        
    forceSelectiontrue
                                    
    }, {
                                        
    xtype'textfield',
                                        
    name'name',
                                        
    fieldLabel'Наименование',
                                        
    allowBlankfalse,
                                        
    labelAlign'left',
                                        
    afterLabelTextTplrequired
                                    
    }, {
                                        
    xtype'textfield',
                                        
    name'alias',
                                        
    fieldLabel'Алиас',
                                        
    allowBlankfalse,
                                        
    labelAlign'left',
                                        
    vtype'alias',
                                        
    afterLabelTextTplrequired
                                    
    }, {
                                        
    xtype'textfield',
                                        
    name'skype',
                                        
    allowBlanktrue,
                                        
    fieldLabel'Skype',
                                        
    labelAlign'left'
                                    
    }, {
                                        
    xtype'textfield',
                                        
    name'icq',
                                        
    fieldLabel'ICQ',
                                        
    allowBlanktrue,
                                        
    labelAlign'left'
                                    
    }, {
                                        
    xtype'textfield',
                                        
    name'spaId',
                                        
    fieldLabel'Spa Id',
                                        
    allowBlanktrue,
                                        
    labelAlign'left'
                                    
    }, {
                                        
    xtype'numberfield',
                                        
    name'order',
                                        
    fieldLabel'Порядок',
                                        
    allowBlanktrue,
                                        
    maxValue2147483647,
                                        
    maxLength9
                                    
    },{
                                        
    xtype'textfield',
                                        
    name'phone',
                                        
    fieldLabel'Телефон',
                                        
    allowBlanktrue
                                    
    }, {
                                        
    xtype'combobox',
                                        
    name'landscapeId',
                                        
    store'WebAdmin.store.DSCompendiumLandscapeForCombo',
                                        
    fieldLabel'Ландшафт',
                                        
    allowBlankfalse,
                                        
    displayField'name',
                                        
    valueField'id',
                                        
    forceSelectiontrue,
                                        
    afterLabelTextTplrequired,
                                        
    editablefalse
                                    
    }, {
                                        
    xtype'combobox',
                                        
    name'warehouseAssembly',
                                        
    store'WebAdmin.store.DSShopListForCombo',
                                        
    fieldLabel'Склад сборки',
                                        
    allowBlanktrue,
                                        
    displayField'name',
                                        
    valueField'id',
                                        
    labelAlign'left',
                                        
    forceSelectiontrue,
                                        
    editablefalse
                                    
    }, {
                                        
    xtype'combobox',
                                        
    name'warehouseDelivery',
                                        
    store'WebAdmin.store.DSShopListForCombo',
                                        
    fieldLabel'Склад доставки',
                                        
    allowBlanktrue,
                                        
    displayField'name',
                                        
    valueField'id',
                                        
    labelAlign'left',
                                        
    forceSelectiontrue,
                                        
    editablefalse
                                    
    }, {
                                        
    xtype'combobox',
                                        
    name'warehouseOrder',
                                        
    store'WebAdmin.store.DSShopListForCombo',
                                        
    fieldLabel'Склад подзаказа',
                                        
    allowBlanktrue,
                                        
    displayField'name',
                                        
    valueField'id',
                                        
    labelAlign'left',
                                        
    forceSelectiontrue,
                                        
    editablefalse
                                    
    }
                            ]
                        },{
                            
    title'Настройка складов для категорий товаров',
                            
    frametrue,
                            
    items: [{
                                
    xtype'gridpanel',
                                
    id'gridTownGoodsCategoryShop',
                                
    autoScrolltrue,
                                
    store'WebAdmin.store.DSTownGoodsCategoryShop',
                                
    columns: [
                                        {
                                            
    dataIndex'id',
                                            
    header'ID',
                                            
    flex1
                                        
    },
                                        {
                                            
    dataIndex'goodCategoryTitle',
                                            
    header'Категория',
                                            
    flex4
                                        
    },
                                        {
                                            
    dataIndex'warehouseAssemblyTitle',
                                            
    header'Склад доставки',
                                            
    flex3
                                        
    },
                                        {
                                            
    dataIndex'warehouseDeliveryTitle',
                                            
    header'Склад сборки',
                                            
    flex3
                                        
    },
                                        {
                                            
    dataIndex'warehouseOrderTitle',
                                            
    header'Склад подзаказа',
                                            
    flex3
                                        
    }
                                ],
                                
                                
    listeners : {
                                    
    itemdblclick: function(viewrecorditemindexeeOpts) {
                                        
    editWindow2 = new WebAdmin.view.forms.FormTownGoodsCategoryShop();
                                        
    editWindow2.setActionCode("TownGoodsCategoryShopStore");
                                        
    editWindow2.title "Редактирование настройки складов";
                                        
                                        
    editWindow2.down("form").getForm().getFields().get(2).store.load();
                                        
    editWindow2.down("form").getForm().getFields().get(3).store.proxy.extraParams.selectedTown record.data.townId;
                                        
    editWindow2.down("form").getForm().getFields().get(3).store.load();
                                        
    editWindow2.down("form").getForm().getFields().get(4).store.proxy.extraParams.selectedTown record.data.townId;
                                        
    editWindow2.down("form").getForm().getFields().get(4).store.load();
                                        
    editWindow2.down("form").getForm().getFields().get(5).store.proxy.extraParams.selectedTown record.data.townId;
                                        
    editWindow2.down("form").getForm().getFields().get(5).store.load();
                                        
                                        
    editWindow2.show();
                                        
    editWindow2.down("form").getForm().setValues({
                                            
    idrecord.data.id,
                                            
    townIdrecord.data.townId,
                                            
    categoryIdrecord.data.goodCategoryId,
                                            
    warehouseAssemblyrecord.data.warehouseAssemblyId,
                                            
    warehouseDeliveryrecord.data.warehouseDeliveryId,
                                            
    warehouseOrderrecord.data.warehouseOrderId
                                        
    });
                                        
    editWindow2.down("form").getForm().getFields().get(5).store.load();
                                    }
                                },
                                
                                
    dockedItems:[{
                                    
    xtype'toolbar',
                                    
    dock'bottom',
                                    
    items: [{
                                        
    id'gridTownGoodsCategoryShop_btnAdd',
                                        
    iconCls'add',
                                        
    text'Добавить',
                                        
    handler: function() {
                                            
    createWindow = new WebAdmin.view.forms.FormTownGoodsCategoryShop();
                                            
    createWindow.setActionCode("TownGoodsCategoryShopAdd");
                                            
    createWindow.title "Создание настройки складов";
                                            
    createWindow.down("form").getForm().setValues({
                                                
    townIdthis.up().up().up().up().up().getForm().getFields().get(0).value
                                            
    });
                                            
    //                                        createWindow.down("form").getForm().getFields().get(2).store.load();
    //                                        createWindow.down("form").getForm().getFields().get(3).store.proxy.extraParams.selectedTown = this.up().up().up().up().up().getForm().getFields().get(0).value;
    //                                        createWindow.down("form").getForm().getFields().get(3).store.load();
    //                                        createWindow.down("form").getForm().getFields().get(4).store.proxy.extraParams.selectedTown = this.up().up().up().up().up().getForm().getFields().get(0).value;
    //                                        createWindow.down("form").getForm().getFields().get(4).store.load();
    //                                        createWindow.down("form").getForm().getFields().get(5).store.proxy.extraParams.selectedTown = this.up().up().up().up().up().getForm().getFields().get(0).value;
    //                                        createWindow.down("form").getForm().getFields().get(5).store.load();
                                            
    createWindow.show();    
                                        }
                                    },
                                    {
                                        
    iconCls'delete',
                                        
    text'Удалить',
                                        
    handler: function() {
                                            var 
    grid Ext.getCmp('gridTownGoodsCategoryShop');
                                            var 
    sm grid.getSelectionModel();
                                            var 
    townId this.up().up().up().up().up().getForm().getFields().get(0).value;
                                            
                                            
                                            
    Ext.Msg.show({
                                                 
    title:'Удаление',
                                                 
    msg'Вы точно хотите удалить пользователя: "'+sm.getSelection()[0].data.login+'"?',
                                                 
    buttonsExt.Msg.YESNO,
                                                 
    iconExt.Msg.QUESTION,
                                                 
    fn: function(buttonIdtextopt){
                                                     if (
    buttonId == 'yes'){
                                                         
    grid.store.remove(sm.getSelection());
                                                        var 
    action = new WebAdmin.utils.JavaAction();
                                                        
    action.setActionCode("TownGoodsCategoryShopDelete");
                                                        var 
    json Ext.JSON.encode(action);
                                                       
                                                        
    grid.store.proxy.extraParams.action json;
                                                         
                                                         
    grid.store.sync({
                                                               
    failure: function(batchoptions) {
                                                                   
    Ext.Msg.show({
                                                                    
    title:'Ошибка',
                                                                    
    msgbatch.proxy.reader.jsonData["errorMessage"],
                                                                    
    buttonsExt.Msg.OK,
                                                                    
    iconExt.Msg.ERROR
                                                                   
    });
                                                                
                                                                var 
    grid Ext.getCmp('gridTownGoodsCategoryShop');
                                                                
    grid.store.load({
                                                                    
    params: {
                                                                        
    selectedTowntownId
                                                                    
    }
                                                                });
                                                               },
                                                               
    success: function(formaction){
                                                                var 
    grid Ext.getCmp('gridTownGoodsCategoryShop');
                                                                
    grid.store.load({
                                                                    
    params: {
                                                                        
    selectedTowntownId
                                                                    
    }
                                                                });
                                                            }
                                                           });
                                                     }
                                                 }
                                            });
                                            
                                        }
                                    },
                                    {
                                        
    iconCls'refresh',
                                        
    text'Обновить',
                                        
    handler: function() {
                                            var 
    grid Ext.getCmp('gridTownGoodsCategoryShop');
                                            
                                            var 
    action = new WebAdmin.utils.JavaAction();
                                            
    action.setActionCode("UserList");
                                            var 
    json Ext.JSON.encode(action);
                                            
    grid.store.load({
                                                
    params: {
                                                    
    Actionjson
                                                
    }
                                            });
                                        }
                                    }]
                                }]
                            }]
                        }]
                    }],
                    
                    
    dockedItems: [{
                        
    xtype'container',
                        
    dock'bottom',
                        
    layout: {
                            
    type'hbox',
                            
    align'middle'
                        
    },
                        
    padding'10 10 5',

                        
    items: [{
                            
    xtype'component',
                            
    id'formErrorState',
                            
    baseCls'form-error-state',
                            
    flex1,
                            
    validText'Все поля заполнены верно',
                            
    invalidText'Не все поля заполнены.',
                            
    tipTplExt.create('Ext.XTemplate''<ul><tpl for="."><li><span class="field-name">{name}</span>: <span class="error">{error}</span></li></tpl></ul>'),

                            
    getTip: function() {
                                var 
    tip this.tip;
                                if (!
    tip) {
                                    
    tip this.tip Ext.widget('tooltip', {
                                        
    targetthis.el,
                                        
    title'Заполните следующие поля:',
                                        
    autoHidefalse,
                                        
    anchor'top',
                                        
    mouseOffset: [-11, -2],
                                        
    closablefalse,
                                        
    constrainPositionfalse,
                                        
    cls'errors-tip'
                                    
    });
                                    
    tip.show();
                                }
                                return 
    tip;
                            },

                            
    setErrors: function(errors) {
                                var 
    me this,
                                    
    baseCls me.baseCls,
                                    
    tip me.getTip();

                                
    errors Ext.Array.from(errors);

                                
    // Update CSS class and tooltip content
                                
    if (errors.length) {
                                    
    me.addCls(baseCls '-invalid');
                                    
    me.removeCls(baseCls '-valid');
                                    
    me.update(me.invalidText);
                                    
    tip.setDisabled(false);
                                    
    tip.update(me.tipTpl.apply(errors));
                                    
    //tip.show();
                                
    } else {
                                    
    me.addCls(baseCls '-valid');
                                    
    me.removeCls(baseCls '-invalid');
                                    
    me.update(me.validText);
                                    
    tip.setDisabled(true);
                                    
    tip.hide();
                                }
                            }
                        }, {
                            
    xtype'button',
                            
    formBindtrue,
                            
    disabledtrue,
                            
    text'Сохранить',
                            
    iconCls'save',
                            
    handler: function() {
                                if (
    this.up('form').getForm().isValid()) {
                                    
                                    var 
    action = new WebAdmin.utils.JavaAction();
                                    
    action.setActionCode(this.up().up().up().actionCode);
                                    var 
    json Ext.JSON.encode(action);
                                    
                                    
    this.up('form').getForm().submit({
                                        
    urlbaseJavaUrl,
                                        
    submitEmptyTextfalse,
                                        
    clientValidationtrue,
                                        
    params: {
                                            
    Actionjson
                                        
    },
                                        
    waitMsg'Отправка данных на сервер...',
                                        
    failure: function(formaction){
                                            
    Ext.Msg.show({
                                                 
    title:'Ошибка',
                                                 
    msgaction.result.errorMessage,
                                                 
    buttonsExt.Msg.OK,
                                                 
    iconExt.Msg.ERROR
                                            
    });
                                        },
                                        
    success: function(formaction){
                                            var 
    tree Ext.getCmp('treeCompendiumTowns');
                                            
    tree.store.load();
                                            
    form.owner.up('window').close();
                                        }
                                    });
                                }
                            }
                        }, {
    xtype:'tbspacer'width10}, {
                            
    xtype'button',
                            
    text'Отменить',
                            
    iconCls'delete',
                            
    handler: function() {
                                
    this.up('form').getForm().reset();
                                if (
    this.up('form').down('#formErrorState').tip){
                                    
    this.up('form').down('#formErrorState').tip.hide();
                                }
                                
    this.up('window').close();
                            }
                        }]
                    }]
                }]
            });
            
    me.callParent(arguments);
        }
    }); 
    Child window:
    PHP Code:
    Ext.define('WebAdmin.view.forms.FormTownGoodsCategoryShop', {
        
    extend'Ext.window.Window',
        
    alias'widget.formFormTownGoodsCategoryShop',
        
        
    width800,
        
    height520,
        
    layout'fit',
        
    resizablefalse,
        
    modaltrue,
        
    maximizablefalse,
        
    closabletrue,
        
    closeAction'destroy',
        
    borderfalse,
        
    bodyBorderfalse,
        
        
    tabId'',
        
    actionCode'',
        
        
    setTabId: function(tabIdForSet) {
            
    this.tabId tabIdForSet;
        },
        
    setActionCode: function(actionCodeForSet) {
            
    this.actionCode actionCodeForSet;
        },
        
        
    listeners: {
            
    beforeclose: {
                
    fn: function(){
                    if (
    this.down('form').down('#formErrorState').tip){
                        
    this.down('form').down('#formErrorState').tip.hide();
                    }
                }
            },
            
    beforehide: {
                
    fn: function(){
                    if (
    this.down('form').down('#formErrorState').tip){
                        
    this.down('form').down('#formErrorState').tip.hide();
                    }
                }
            }
        },
        
        
    initComponent: function() {
            var 
    me this;

            
    Ext.applyIf(me, {
                
    items: [{
                    
    xtype'form',
                    
    frametrue,
                    
    autoScrolltrue,
                    
    bodyPadding10,
                    
    bodyBordertrue,
                    
                    
    defaults: {
                        
    anchor'100%'
                    
    },

                    
    fieldDefaults: {
                        
    labelAlign'left',
                        
    labelWidth150,
                        
    labelStyle'font-weight:bold',
                        
    msgTarget'none',
                        
    invalidCls''
                    
    },
                    
                    
    listeners: {
                        
    fieldvaliditychange: function() {
                            
    this.updateErrorState();
                        },
                        
    fielderrorchange: function() {
                            
    this.updateErrorState();
                        }
                    },
                    
                    
    updateErrorState: function() {
                        var 
    me this,
                            
    errorCmpfieldserrors;
                        if (
    me.hasBeenDirty || me.getForm().isDirty()) { //prevents showing global error when form first loads
                            
    errorCmp me.down('#formErrorState');
                            
    fields me.getForm().getFields();
                            
    errors = [];
                            
    fields.each(function(field) {
                                
    Ext.Array.forEach(field.getErrors(), function(error) {
                                    
    errors.push({namefield.getFieldLabel(), errorerror});
                                });
                            });
                            
    errorCmp.setErrors(errors);
                            
    me.hasBeenDirty true;
                        }
                    },
                    
                    
    items: [{
                          
    xtype'hiddenfield',
                          
    name'id'
                      
    },{
                          
    xtype'hiddenfield',
                          
    name'townId'
                      
    }
                    ],

    //                items: [{
    //                        xtype: 'hiddenfield',
    //                        name: 'id'
    //                    },{
    //                        xtype: 'hiddenfield',
    //                        name: 'townId'
    //                    },{
    //                        xtype: 'treecombo',
    //                        name: 'categoryId',
    //                        itemId: 'categoryTree',
    //                        fieldLabel: 'Категория товара',
    //                        treeWidth: 380,
    //                        allowBlank: false,
    //                        store: 'WebAdmin.store.DSGoodsCategoryForTree',
    //                        editable: false
    //                    }, {
    //                        xtype: 'combobox',
    //                        name: 'warehouseAssembly',
    //                        store: 'WebAdmin.store.DSShopListForCombo',
    //                        fieldLabel: 'Склад сборки',
    //                        allowBlank: true,
    //                        displayField: 'name',
    //                        valueField: 'id',
    //                        labelAlign: 'left',
    //                        forceSelection: true,
    //                        editable: false
    //                    }, {
    //                        xtype: 'combobox',
    //                        name: 'warehouseDelivery',
    //                        store: 'WebAdmin.store.DSShopListForCombo',
    //                        fieldLabel: 'Склад доставки',
    //                        allowBlank: true,
    //                        displayField: 'name',
    //                        valueField: 'id',
    //                        labelAlign: 'left',
    //                        forceSelection: true,
    //                        editable: false
    //                    }, {
    //                        xtype: 'combobox',
    //                        name: 'warehouseOrder',
    //                        store: 'WebAdmin.store.DSShopListForCombo',
    //                        fieldLabel: 'Склад подзаказа',
    //                        allowBlank: true,
    //                        displayField: 'name',
    //                        valueField: 'id',
    //                        labelAlign: 'left',
    //                        forceSelection: true,
    //                        editable: false
    //                }],
                    
                    
    dockedItems: [{
                        
    xtype'container',
                        
    dock'bottom',
                        
    layout: {
                            
    type'hbox',
                            
    align'middle'
                        
    },
                        
    padding'10 10 5',

                        
    items: [{
                            
    xtype'component',
                            
    itemId'formErrorState',
                            
    baseCls'form-error-state',
                            
    flex1,
                            
    validText'Все поля заполнены верно',
                            
    invalidText'Не все поля заполнены.',
                            
    tipTplExt.create('Ext.XTemplate''<ul><tpl for="."><li><span class="field-name">{name}</span>: <span class="error">{error}</span></li></tpl></ul>'),

                            
    getTip: function() {
                                var 
    tip this.tip;
                                if (!
    tip) {
                                    
    tip this.tip Ext.widget('tooltip', {
                                        
    targetthis.el,
                                        
    title'Заполните следующие поля:',
                                        
    autoHidefalse,
                                        
    anchor'top',
                                        
    mouseOffset: [-11, -2],
                                        
    closablefalse,
                                        
    constrainPositionfalse,
                                        
    cls'errors-tip'
                                    
    });
                                    
    tip.show();
                                }
                                return 
    tip;
                            },

                            
    setErrors: function(errors) {
                                var 
    me this,
                                    
    baseCls me.baseCls,
                                    
    tip me.getTip();

                                
    errors Ext.Array.from(errors);

                                
    // Update CSS class and tooltip content
                                
    if (errors.length) {
                                    
    me.addCls(baseCls '-invalid');
                                    
    me.removeCls(baseCls '-valid');
                                    
    me.update(me.invalidText);
                                    
    tip.setDisabled(false);
                                    
    tip.update(me.tipTpl.apply(errors));
                                    
    //tip.show();
                                
    } else {
                                    
    me.addCls(baseCls '-valid');
                                    
    me.removeCls(baseCls '-invalid');
                                    
    me.update(me.validText);
                                    
    tip.setDisabled(true);
                                    
    tip.hide();
                                }
                            }
                        }, {
                            
    xtype'button',
                            
    formBindtrue,
                            
    disabledtrue,
                            
    text'Сохранить',
                            
    iconCls'save',
                            
    handler: function() {
                                if (
    this.up('form').getForm().isValid()) {
                                    
                                    var 
    action = new WebAdmin.utils.JavaAction();
                                    
    action.setActionCode(this.up().up().up().actionCode);
                                    var 
    json Ext.JSON.encode(action);
                                    
                                    
    this.up('form').getForm().submit({
                                        
    urlbaseJavaUrl,
                                        
    submitEmptyTextfalse,
                                        
    clientValidationtrue,
                                        
    params: {
                                            
    Actionjson
                                        
    },
                                        
    waitMsg'Отправка данных на сервер...',
                                        
    failure: function(formaction){
                                            
    Ext.Msg.show({
                                                 
    title:'Ошибка',
                                                 
    msgaction.result.errorMessage,
                                                 
    buttonsExt.Msg.OK,
                                                 
    iconExt.Msg.ERROR
                                            
    });
                                        },
                                        
    success: function(formaction){
                                            var 
    tree Ext.getCmp('treeCompendiumTowns');
                                            
    tree.store.load();
                                            
    form.owner.up('window').close();
                                        }
                                    });
                                }
                            }
                        }, {
    xtype:'tbspacer'width10}, {
                            
    xtype'button',
                            
    text'Отменить',
                            
    iconCls'delete',
                            
    handler: function() {
                                
    this.up('form').getForm().reset();
                                if (
    this.up('form').down('#formErrorState').tip){
                                    
    this.up('form').down('#formErrorState').tip.hide();
                                }
                                
    this.up('window').close();
                            }
                        }]
                    }]
                }]
            });
            
    me.callParent(arguments);
        }
    }); 

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3356
    Vote Rating
    750
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    That's a bunch of code. Where in your code causes this? Have you started to break things down?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar