View Full Version : define extend: Ext.window.Window does not rendered.

8 Jul 2012, 3:26 AM

I am newbie, and about to make an analog to my current working alias ingestion from Viewport.js. So my Viewport.js is something like this:
... xtype: 'loginPanel'...

if the loginPanel.js (under view) is a panel or field container everything works fine, but not nice for a login window.

The panel one:
extend: 'Ext.panel.Panel',
alias: 'widget.loginPanel',
layout: {
type: 'vbox', // Arrange child items vertically
align: 'stretch', // Each takes up full width
padding: 5
height: 200,
width: 400,

And the window what is not doing:
Ext.define('myApp.view.loginPanel', {
extend : 'Ext.window.Window',
alias: 'widget.loginPanel',
title: 'Mywindow',
closeAction: 'hide',
width: 300,
height: 300,
layout: 'fit',
resizable: false,
draggable: true,
modal: true,

I hope you can help me, what I am doing wrong here. I have tried to explicit importing window.Window by required directive - just to be on a safer side. No luck. But I am still got the feeling it is related to xtype:'window'.


8 Jul 2012, 11:23 AM
I am not sure I understand .. is this what you mean?

Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [{
region: 'north',
html: '<h1 class="x-panel-header">Page Title</h1>',
border: false,
margins: '0 0 5 0'

}, {
region: 'center',
xtype: 'tabpanel'


Ext.create('Ext.window.Window', {
title: 'Hello',
height: 200,
width: 400,
layout: 'fit',
items: { // Let's put an empty grid in just to illustrate fit layout
xtype: 'grid',
border: false,
columns: [{header: 'World'}],
store: Ext.create('Ext.data.ArrayStore', {}) // A dummy empty data store


8 Jul 2012, 11:26 AM
In using your define ...

Ext.define('myApp.view.loginPanel', {
// window details.

var win = Ext.create('myApp.view.loginPanel', {
}); // or you can place show here .. }).show(); as shown above


9 Jul 2012, 6:41 AM
Thank you Guys,

my mistake was trying to get login win w/o instantiate it. Finally my solution was a form.Panel and just aligned to center, looks like a modal windows, and enough for a login screen.


15 Jul 2012, 5:32 AM