1. #1
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    5
    zlevardy is on a distinguished road

      0  

    Default Unanswered: define extend: Ext.window.Window does not rendered.

    Unanswered: define extend: Ext.window.Window does not rendered.


    Hi,

    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:
    Ext.define('myApp.view.loginPanel',{
    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'.

    thx,
    Zol


  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,007
    Answers
    666
    Vote Rating
    459
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    I am not sure I understand .. is this what you mean?

    Code:
    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
        }
    }).show();
    Scott.

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,007
    Answers
    666
    Vote Rating
    459
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    In using your define ...

    Code:
    Ext.define('myApp.view.loginPanel', {
    // window details.
    ]);
    
    var win = Ext.create('myApp.view.loginPanel', {
    //
    }); // or you can place show here .. }).show(); as shown above
    
    win.show();
    Last edited by scottmartin; 8 Jul 2012 at 11:27 AM. Reason: fix code

  4. #4
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    5
    zlevardy is on a distinguished road

      0  

    Default thanks

    thanks


    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.

    cu

  5. #5
    Sencha User
    Join Date
    Jul 2012
    Posts
    1
    Vote Rating
    0
    habib.maa111 is on a distinguished road

      0  

    Default


    helful........................

Thread Participants: 2