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 7730331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:11:57+00:00 2026-06-01T06:11:57+00:00

I am working with extjs designer 2. It works ok and i designed a

  • 0

I am working with extjs designer 2. It works ok and i designed a viewport. It creates some view files. The first one is myviewport.js:

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

    layout: {
        type: 'border'
    },

    initComponent: function () {
        var me = this;

        Ext.applyIf(me, {
            items: [{
                xtype: 'tabpanel',
                activeTab: 1,
                region: 'center',
                items: [{
                    xtype: 'panel',
                    title: 'SIM usage'
                }, {
                    xtype: 'gridpanel',
                    title: 'Reports',
                    forceFit: true,
                    store: 'ReportsStore',
                    columns: [{
                        xtype: 'gridcolumn',
                        dataIndex: 'Name',
                        text: 'Name'
                    }, {
                        xtype: 'gridcolumn',
                        dataIndex: 'Type',
                        text: 'Type'
                    }, {
                        xtype: 'gridcolumn',
                        dataIndex: 'Description',
                        text: 'Description'
                    }, {
                        xtype: 'actioncolumn',
                        items: [{
                            handler: function (view, rowIndex, colIndex, item, e) {
                                alert(view);
                            },
                            altText: 'Run report',
                            iconCls: 'runReport'
                        }]
                    }],
                    viewConfig: {

                    },
                    dockedItems: [{
                        xtype: 'toolbar',
                        dock: 'top',
                        items: [{
                            xtype: 'tbfill'
                        }, {
                            xtype: 'button',
                            iconCls: 'addReport',
                            text: 'Add report',
                            listeners: {
                                click: {
                                    fn: me.onButtonClick,
                                    scope: me
                                }
                            }
                        }]
                    }]
                }, {
                    xtype: 'panel',
                    title: 'Pyshical SIM cards'
                }, {
                    xtype: 'panel',
                    title: 'Virtual SIM cards'
                }, {
                    xtype: 'form',
                    layout: {
                        type: 'absolute'
                    },
                    bodyPadding: 10,
                    title: 'Config',
                    items: [{
                        xtype: 'numberfield',
                        id: 'IP1',
                        width: 220,
                        fieldLabel: 'Server IP',
                        labelWidth: 150
                    }, {
                        xtype: 'numberfield',
                        id: 'IP2',
                        width: 80,
                        fieldLabel: '.',
                        labelPad: 0,
                        labelSeparator: ' ',
                        labelWidth: 10,
                        x: 240,
                        y: 10
                    }, {
                        xtype: 'numberfield',
                        id: 'IP3',
                        width: 80,
                        fieldLabel: '.',
                        labelPad: 0,
                        labelSeparator: ' ',
                        labelWidth: 10,
                        x: 330,
                        y: 10
                    }, {
                        xtype: 'numberfield',
                        id: 'IP4',
                        width: 80,
                        fieldLabel: '.',
                        labelPad: 0,
                        labelSeparator: ' ',
                        labelWidth: 10,
                        x: 420,
                        y: 10
                    }, {
                        xtype: 'textfield',
                        id: 'username',
                        fieldLabel: 'username',
                        labelWidth: 150,
                        anchor: '100%',
                        x: 10,
                        y: 40
                    }, {
                        xtype: 'textfield',
                        id: 'password',
                        inputType: 'password',
                        fieldLabel: 'password',
                        labelWidth: 150,
                        anchor: '100%',
                        x: 10,
                        y: 70
                    }, {
                        xtype: 'textareafield',
                        id: 'emails',
                        fieldLabel: 'Alert emails',
                        labelWidth: 150,
                        anchor: '100%',
                        x: 10,
                        y: 100
                    }, {
                        xtype: 'textfield',
                        id: 'smtp',
                        fieldLabel: 'SMTP',
                        labelWidth: 150,
                        anchor: '100%',
                        x: 10,
                        y: 170
                    }, {
                        xtype: 'textfield',
                        id: 'smtpCredentials',
                        fieldLabel: 'SMTP Server credentials',
                        labelWidth: 150,
                        anchor: '100%',
                        x: 10,
                        y: 200
                    }, {
                        xtype: 'button',
                        height: 30,
                        width: 90,
                        text: 'Restore',
                        x: 170,
                        y: 230
                    }, {
                        xtype: 'button',
                        height: 30,
                        width: 90,
                        text: 'Save config',
                        x: 270,
                        y: 230
                    }]
                }]
            }]
        });

        me.callParent(arguments);
    },

    onButtonClick: function (button, e, options) {}
});

with the

onButtonClick: function(button, e, options) { }

I want to open a window. But I don’t know how to do this. I already have made a window and this is stored in the mywindow.js file:

Ext.define('MyApp.view.MyWindow', {
    extend: 'Ext.window.Window',

    height: 334,
    width: 540,
    layout: {
        type: 'border'
    },
    title: 'Run report',

    initComponent: function () {
        var me = this;

        Ext.applyIf(me, {
            items: [{
                xtype: 'form',
                bodyPadding: 10,
                region: 'center'
            }]
        });

        me.callParent(arguments);
    }
});

Now what do i put in the onbuttonclick event?

  • 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-01T06:11:58+00:00Added an answer on June 1, 2026 at 6:11 am

    Adding

    Ext.create('MyApp.view.MyWindow').show();
    

    To your button handler should do the trick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working with an api and I need to one of the first responses alongside
I'm working on an internal extjs 4 project. I have a viewport with tabpanel.
i'm working on extjs and came across one small problem it is , wen
I am working on my first project using ExtJS. I have a Data Grid
I'm working on some management system using PHP & some ExtJS. Generally, I generate
Im working only 2 weeks with ExtJS. And all my code looks like one
i m working with extjs designer 1.2. I have a button on panel that
i am working with Extjs 4 & using Designer 1.2.0 i am facing problems
i am working with extjs and openlayers for trying some web application. now i
Working on a program in python to print out the first 1000 prime numbers

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.