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

The Archive Base Latest Questions

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

I have created a view like this Ext.define(‘App.view.Message’, { extend: ‘Ext.Panel’, alias: ‘widget.message’, config:

  • 0

I have created a view like this

Ext.define('App.view.Message', {
    extend: 'Ext.Panel',
    alias: 'widget.message',
    config: {
        layout: 'vbox',
        bigText: 'big Text',
        smallText: 'small text',
        imageUrl: 'imageurl',
        oT: '',
        description: 'message description',

        items: [
            {
            flex: 3,
            xtype: 'container',
            layout: 'hbox',
            items: [
                {
                    xtype: 'container',
                    flex: 1,
                    items: [
                        {
                            html: '<h3>' + this.getBigText() + '</h3>'
                        },
                        {
                            html: '<h5>' + this.getSmallText() + '</h5>'
                        }
                    ]
                },
                {
                    xtype: 'image',
                    src: this.getImageUrl(),
                    flex: 1
                }
            ]
        },
            {
            flex: 6,
            xtype: 'container',
            layout: 'vbox',
            items: [
                {
                    flex:1,
                    html: '<h3>' + this.getBigText() + '</h3>'
                },
                {
                    flex:5,
                    html: '<p>'+this.getDescription()+'</p>'
                }
            ]
        },
            {
            flex: 1,
            xtype: 'button',
            text: this.getOT()
        }
        ]
    }
})

i need to access values that will be passed when this view is created (config values) while creating the view.
so statement this.getDescription(), this.getBigText() etc etc are generating errors..
what i want is tht the view should be rendered with the config values that i pass is when im creating the view..
what should i do?

  • 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-05T05:10:27+00:00Added an answer on June 5, 2026 at 5:10 am

    When you are define and load a “View” file – browser go through each line. The “View” instance isn’t created at that time. So, naturally the this cannot be found there.

    However, you can use “this” inside the initialize function. So, you can write your code like this:

    Ext.define('App.view.Message', {
        extend: 'Ext.Panel',
        xtype: 'message',
        config: {
            layout: 'vbox',
            bigText: 'big Text',
            smallText: 'small text',
            imageUrl: 'imageurl',
            oT: '',
            description: 'message description'
        },
    
    initialize : function(){
         this.add([
                {
                flex: 3,
                xtype: 'container',
                layout: 'hbox',
                items: [
                    {
                        xtype: 'container',
                        flex: 1,
                        items: [
                            {
                                html: '<h3>' + this.bigText + '</h3>'
                            },
                            {
                                html: '<h5>' + this.smallText + '</h5>'
                            }
                        ]
                    },
                    {
                        xtype: 'image',
                        src: this.imageUrl,
                        flex: 1
                    }
                ]
            },
                {
                flex: 6,
                xtype: 'container',
                layout: 'vbox',
                items: [
                    {
                        flex:1,
                        html: '<h3>' + this.bigText + '</h3>'
                    },
                    {
                        flex:5,
                        html: '<p>'+ this.description +'</p>'
                    }
                ]
            },
                {
                flex: 1,
                xtype: 'button',
                text: this.oT
            }
            ]);
    
            this.callParent(arguments);
    }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this controller: Ext.define('MyApp.controller.Test', { extend: 'Ext.app.Controller', config: { }, refs: [ {
I have created a helper method in view like this: @helper DisputeOpenedDays(DateTime createdDate) {
I have created a link for deletion in asp.net mvc3 razor view like this:
I have created a Dynamic View Panel custom control and want to add a
I have created a gallery view and I want to display video (like any
I have created a custom tab layout which look like this,I want to make
I have created a custom view by extending Relative Layout and it looks like
hii every one i have created a data entry screen like this in which
I have created this view in DB2 LUW: CREATE VIEW SCHEMA.TYPE(TYPEID, TYPENAME) AS SELECT
I am using MVVM Light. I have created a window that looks like this:

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.