Results 1 to 2 of 2

Thread: column layout in MVC application (Ext 4.2.1)

  1. #1
    Sencha User
    Join Date
    Nov 2009
    Location
    Aveiro, Portugal
    Posts
    47
    Answers
    3

    Default Answered: column layout in MVC application (Ext 4.2.1)

    Hi all,I want to create a simple tree column layout inside a tabpanel. In a stand alone ExtJS app, there is no problem. I've changed the Three Column Example and it work fine inside a tabpanel. The very small changes are available in this gist.But I'm not able to do the same in a ExtJS MVC application. I define a tabpanel in the Viewport, and on the first tabpanel I want to include the three column layout. But all the contents appears in one column, as shown in the following sreen capture.The view Viewport code is:
    Code:
    Ext.define('DemoExtJs.view.Viewport', {	extend : 'Ext.container.Viewport',	requires : ['Ext.tab.Panel', 'Ext.layout.container.Border', 'Ext.layout.container.Column'],	layout : 'border',	items : [{		title : 'Node.js + ExtDirect + ExtJS 4',		region : 'north',		xtype : 'topheader'	}, {		region : 'center',		xtype : 'tabpanel',		items : [{			xtype : 'bem-vindo-panel'		}, {			xtype : 'app-main-map-panel'		}]	}]});
    The view BemVindoPanel (the contents of the tabpanel) code is:
    Code:
    Ext.define('DemoExtJs.view.BemVindoPanel', {	extend : 'Ext.panel.Panel',	xtype : 'bem-vindo-panel',	title : 'Bem vindo',	layout : 'column',	autoScroll : true,	defaultType : 'container',	items : [{		columnWidth : 1 / 3,		padding : '5 0 5 5',		items : [{			title : 'A Panel',			html : 'Ext.example.shortBogusMarkup'		}, {			title : 'A Panel',			html : 'Ext.example.shortBogusMarkup'		}]	}, {		columnWidth : 1 / 3,		padding : '5 0 5 5',		items : [{			title : 'Outro Panel',			html : 'Ext.example.shortBogusMarkup'		}]	}, {		columnWidth : 1 / 3,		padding : 5,		items : [{			title : 'A Panel',			html : 'Ext.example.shortBogusMarkup'		}, {			margin : '5 0 0 0',			title : 'Another Panel',			html : 'Ext.example.shortBogusMarkup'		}]	}]});
    Should I have to listen events related with this view (or upper views) to updateLayout? Which events?Why this layout behaves differently from a stand alone app?

  2. Although the column layout did not work during development, after
    Code:
    sencha app build
    , the layout started to work as expected. I don't understand why, but now it works.

    By the way, the same happens with the RowEditor plugin. Only after
    Code:
    sencha app build
    it works.

  3. #2
    Sencha User
    Join Date
    Nov 2009
    Location
    Aveiro, Portugal
    Posts
    47
    Answers
    3

    Default Problem solved

    Although the column layout did not work during development, after
    Code:
    sencha app build
    , the layout started to work as expected. I don't understand why, but now it works.

    By the way, the same happens with the RowEditor plugin. Only after
    Code:
    sencha app build
    it works.

Tags for this Thread

Posting Permissions

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