Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8101535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:00:10+00:00 2026-06-05T23:00:10+00:00

I am using a main viewport. I use the north panel for buttons. When

  • 0

I am using a main viewport. I use the north panel for buttons. When i click on a button i want to load a panel in the center region. I made some views in architect allready.

mainviewport

Ext.define('MyApp.view.MyViewport', {
extend: 'Ext.container.Viewport',

layout: {
    type: 'border'
},

initComponent: function() {
    var me = this;

    Ext.applyIf(me, {
        items: [
            {
                xtype: 'container',
                height: 65,
                region: 'north',
                items: [
                    {
                        xtype: 'button',
                        height: 50,
                        maxHeight: 50,
                        maxWidth: 50,
                        minHeight: 50,
                        minWidth: 50,
                        style: 'margin: 5px;',
                        width: 50,
                        text: 'Home'
                    },
                    {
                        xtype: 'button',
                        height: 50,
                        maxHeight: 50,
                        maxWidth: 50,
                        minHeight: 50,
                        minWidth: 50,
                        style: 'margin: 5px;',
                        width: 50,
                        text: 'Verkoop'
                    },
                    {
                        xtype: 'button',
                        height: 50,
                        maxHeight: 50,
                        maxWidth: 50,
                        minHeight: 50,
                        minWidth: 50,
                        style: 'margin: 5px;',
                        width: 50,
                        text: 'Verhuur'
                    },
                    {
                        xtype: 'button',
                        height: 50,
                        maxHeight: 50,
                        maxWidth: 50,
                        minHeight: 50,
                        minWidth: 50,
                        style: 'margin: 5px;',
                        width: 50,
                        text: 'Magazijn'
                    },
                    {
                        xtype: 'button',
                        height: 50,
                        maxHeight: 50,
                        maxWidth: 50,
                        minHeight: 50,
                        minWidth: 50,
                        style: 'margin: 5px;',
                        width: 50,
                        text: 'TD'
                    },
                    {
                        xtype: 'button',
                        height: 50,
                        maxHeight: 50,
                        maxWidth: 50,
                        minHeight: 50,
                        minWidth: 50,
                        style: 'margin: 5px;',
                        width: 50,
                        text: 'Planning'
                    },
                    {
                        xtype: 'button',
                        height: 50,
                        maxHeight: 50,
                        maxWidth: 50,
                        minHeight: 50,
                        minWidth: 50,
                        style: 'margin: 5px;',
                        width: 50,
                        text: 'Facturen'
                    },
                    {
                        xtype: 'button',
                        height: 50,
                        maxHeight: 50,
                        maxWidth: 50,
                        minHeight: 50,
                        minWidth: 50,
                        style: 'margin: 5px;',
                        width: 50,
                        text: 'Klachten'
                    },
                    {
                        xtype: 'button',
                        height: 50,
                        maxHeight: 50,
                        maxWidth: 50,
                        minHeight: 50,
                        minWidth: 50,
                        style: 'margin: 5px;',
                        width: 50,
                        text: 'OPM'
                    }
                ]
            }
        ]
    });

    me.callParent(arguments);
}

when i click on the button “magazijn” for example i want to load this view into the center region:

Ext.define('MyApp.view.Magazijn', {
extend: 'Ext.panel.Panel',

layout: {
    type: 'border'
},
title: 'Magazijn',

initComponent: function() {
    var me = this;

    Ext.applyIf(me, {
        items: [
            {
                xtype: 'panel',
                layout: {
                    type: 'border'
                },
                title: 'Pakbonnen',
                region: 'center',
                dockedItems: [
                    {
                        xtype: 'toolbar',
                        region: 'center',
                        dock: 'top',
                        items: [
                            {
                                xtype: 'button',
                                text: 'Beschadiging melden'
                            },
                            {
                                xtype: 'button',
                                text: 'Vermissing melden'
                            }
                        ]
                    },
                    {
                        xtype: 'gridpanel',
                        height: 150,
                        title: 'Uitgaande pakbonnen',
                        store: 'MyJsonStore',
                        region: 'north',
                        dock: 'top',
                        columns: [
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'string',
                                text: 'String'
                            },
                            {
                                xtype: 'numbercolumn',
                                dataIndex: 'number',
                                text: 'Number'
                            },
                            {
                                xtype: 'datecolumn',
                                dataIndex: 'date',
                                text: 'Date'
                            },
                            {
                                xtype: 'booleancolumn',
                                dataIndex: 'bool',
                                text: 'Boolean'
                            }
                        ],
                        viewConfig: {

                        },
                        dockedItems: [
                            {
                                xtype: 'pagingtoolbar',
                                width: 360,
                                displayInfo: true,
                                store: 'MyJsonStore',
                                dock: 'bottom'
                            }
                        ]
                    }
                ],
                items: [
                    {
                        xtype: 'gridpanel',
                        title: 'Retour pakbonnen',
                        store: 'MyJsonStore',
                        region: 'center',
                        columns: [
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'string',
                                text: 'String'
                            },
                            {
                                xtype: 'numbercolumn',
                                dataIndex: 'number',
                                text: 'Number'
                            },
                            {
                                xtype: 'datecolumn',
                                dataIndex: 'date',
                                text: 'Date'
                            },
                            {
                                xtype: 'booleancolumn',
                                dataIndex: 'bool',
                                text: 'Boolean'
                            }
                        ],
                        viewConfig: {

                        },
                        dockedItems: [
                            {
                                xtype: 'pagingtoolbar',
                                width: 360,
                                displayInfo: true,
                                store: 'MyJsonStore',
                                dock: 'bottom'
                            }
                        ]
                    }
                ]
            }
        ],
        dockedItems: [
            {
                xtype: 'toolbar',
                width: 150,
                region: 'west',
                dock: 'top',
                items: [
                    {
                        xtype: 'button',
                        text: 'Product zoeken'
                    }
                ]
            }
        ]
    });

    me.callParent(arguments);
}

How can i do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:00:12+00:00Added an answer on June 5, 2026 at 11:00 pm
    1. Make the center region a container with a card (or fit or tab) layout

    2. Call the add method on the center region, adding your component

    To get a reference to viewport:

    var viewport = Ext.ComponentQuery.query('viewport')[0];
    

    To get a reference to center region:

    var center = viewport.down('[region=center]');
    
    var view = Ext.create('MyView');
    
    center.add(view);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Cocos2D for my main framework. In some cases, I want Cocos2D
I have a Viewport and in Center region I have a tabpanel.Each tabpanel contain
In order to ensure that some initialization code runs before main (using Arduino/avr-gcc) I
I am using main form and child forms. If I open 2nd child form
I'm trying to implement quicksort in Python using 2 main functions - partition and
I'm using this CSS: #main{ border-radius: 50px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; -webkit-border-radius: 50px; -webkit-border-bottom-right-radius:
When a modal dialog box is present, messages sent to the main window using
My main solution is using code from a utility class library, that I wrote
Using the following code to write to a file int main(int argc, char *
I'm using an error handler on my main calling procedure and letting the other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.