1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    2
    Vote Rating
    0
    dlozic128 is on a distinguished road

      0  

    Default Answered: Ext-JS 4 border layout inside card layout

    Answered: Ext-JS 4 border layout inside card layout


    I am creating an application with Ext-JS 4.
    Cards:
    1.) Login card
    2.) Application card
    Application card has a border layout.
    When I show them separately, they work but when I put them in a Viewport together, they don't work.
    Here is my Viewport:
    Code:
    Ext.define('MyApp.view.Viewport', {
        extend: 'Ext.container.Viewport',
        layout: 'card',
    
        items: [
            {
                xtype: 'loginform',
            },
            {
                xtype: 'mainapp'
            }
        ]
    });
    Here is a part of my Login card:
    Code:
    Ext.define('Sabrina.view.login.Form' ,{
        extend: 'Ext.form.FormPanel',
        alias : 'widget.loginform',
    
        name: 'loginform',
        frame: true,
        title: 'Login',
        bodyPadding: '5px 5px 0',
        width: 350,
        ...
    Here is a part of my Application card:
    Code:
    Ext.define('Sabrina.view.Main', {
        extend: 'Ext.panel.Panel',
        alias: ['widget.mainapp'],
        layout: 'border',
            items: [
              //here I have 'west' and 'center' regions
            ]
    I've created the same components in a different application separately and they work but here not. Do I have to put something more if I want a border layout inside card layout?
    I'm getting this:
    Code:
    Uncaught TypeError: Cannot call method 'substring' of undefined
    Thank you.

  2. You are trying to access a type that is not available. Please check the following:

    You have requires:[] where needed
    That you have not use the wrong case when accessing a type 'loginForm' instead of 'loginform'
    Use ext-dev.js instead of ext.js to display warnings in your console about possible problems.

    Scott.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Answers
    655
    Vote Rating
    443
    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


    You are trying to access a type that is not available. Please check the following:

    You have requires:[] where needed
    That you have not use the wrong case when accessing a type 'loginForm' instead of 'loginform'
    Use ext-dev.js instead of ext.js to display warnings in your console about possible problems.

    Scott.

  4. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    2
    Vote Rating
    0
    dlozic128 is on a distinguished road

      0  

    Default


    Finally... Someone with a great answer!

    I'll try it and if this is the case, I'll mark this as "accepted" answer.

    Thank you @scottmartin.

Thread Participants: 1

Tags for this Thread