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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:29:27+00:00 2026-06-18T09:29:27+00:00

i am working in extjs4 MVC plus yii framework.I am getting stuck at a

  • 0

i am working in extjs4 MVC plus yii framework.I am getting stuck at a point which is how to access extra parameters in jason file coming from server and handle it to client side in extjs4.
My code:-
1) My json file is:–

{
    'users': [
        {
            "userId": 1,
            "userName": 'Who will win the series11111111?',
            "message":"You are welcome",
        }
    ]
}       

2) My userModel class in extjs4 :–
In this file there is no any ‘message’ attribute available.

Ext.define('Balaee.model.sn.UserModel',{

extend: 'Ext.data.Model',

fields: ['userId','userName','password'],
proxy:
{
    type:'ajax',
    api:
    {
        read:'http://localhost/balaee/Balaee/index.php?r=SocialNetworking/user/AuthenticateLogin',
        create:'http://localhost/balaee/Balaee/index.php?r=SocialNetworking/user/AuthenticateLogin',
    },//end of api
    reader:
    {
        type:'json',
        root:'users'
    },//end of reader
    writer:
    {
        type:'json',
        root:'records',
    },//End of writer
}//end of proxy
});

3)And here is my view file where I am going to access userName and message fields coming from json file.

Ext.define('Balaee.view...',
        {
                extend:'Ext.view.View',
                store:'kp.UserStore',
                config:
                {
                    tpl:'<tpl for=".">'+
                        '<div id="main">'+
                        '</br>'+
                        '<b>userName :-</b> {userName}</br>'+
                        '<b>message :-</b> {message}</br>'+
                        '</div>'+
                        '</tpl>',
                    itemSelector:'div.main',    
                }
        });// End of login class

But its not working.It display userName field value but not displaying message field value.

Actually I want to access a message field which is not persent in model class in extjs4. Is it correct to access to this type of fields having no any relationship? How can I access this type of fields. Please give me some suggestions.

  • 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-18T09:29:29+00:00Added an answer on June 18, 2026 at 9:29 am

    An Ext.data.Model only knows about the fields it has defined. This is clear from the examples in the documentation.

    If you want message to be available to your view, it must also be available from your model:

    Ext.define('Balaee.model.sn.UserModel',{
        extend: 'Ext.data.Model',
        fields: ['userId', 'userName', 'password', 'message'],
        // ...
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working in extjs4 MVC. Where i am getting stuck at a point*
i am working in extjs4 MVC and I have been getting stuck at a
I am working with Extjs4.1 MVC. What I am trying to do is save
i am working in extjs4 MVC where I have been working on task to
I am working in extjs + Yii framework. my server side is in Yii
I am working on an Extjs portal example and downloaded the example from extjs4-mvc-portal
I am working on extjs4, my case is: Extjs mvc is used to build
Working with MS Access for the first time and coming across a few problems
I'm working with a long form/survey in extjs which calls a script which then
Hope you are doing good. I am new in extjs4 and working on sample

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.