Results 1 to 2 of 2

Thread: [E] Layout run failed

  1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    97
    Answers
    4
    Vote Rating
    4
      1  

    Default [E] Layout run failed

    Greetings,

    I have a hidden window that I want to show when a button is clicked.
    However it won't work with an hbox layout type. It works fine with vbox though.

    The window :
    Code:
    Ext.define('MCS.view.case.history.HistoryWindow', {
        extend: 'Ext.window.Window',
        alias: 'widget.historyWindow',
    
        itemId: 'historyWindow',
        title: 'Case History',
    
        width: 640,
        height: 400,
    
        closable: false,
        closeAction: 'hide',
        hideMode: 'offsets',
    
        layout: { type: 'vbox', align: 'stretch' },
    
        modal: false,
    
        items:
        [
            { xtype: 'historyGrid'},
            {
                xtype: 'container',
                items:
                [
                    { xtype: 'container', items: [{ xtype: 'label' }] },
                    { xtype: 'container', items: [{ xtype: 'textfield' }, { xtype: 'textfield' }] },
                    { xtype: 'container', items: [{ xtype: 'textfield' }, { xtype: 'textfield' }] },
                    { xtype: 'container', items: [{ xtype: 'panel' }, { xtype: 'panel' }, { xtype: 'panel' }] }
                ]
            },
        ],
    
        initComponent: function () {
    
            this.callParent();
        }
    });
    The method that is executed when the button is clicked :
    Code:
        toggleHistoryWindow: function () {
            if (Ext.ComponentQuery.query('window#historyWindow')[0].hidden) {
                Ext.ComponentQuery.query('window#historyWindow')[0].show();
            }
            else {
                Ext.ComponentQuery.query('window#historyWindow')[0].close();
            }
        },

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,233
    Answers
    755
    Vote Rating
    1012
      0  

    Default

    You'll need to post a runnable test case, there's too much information missing:

    https://fiddle.sencha.com
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •