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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:42:52+00:00 2026-06-07T05:42:52+00:00

I need to know how to populate a Label with values from Store .

  • 0

I need to know how to populate a Label with values from Store. In my Model i have defined a field called bookname. and i need to populate this label with the Book Name.

I know how to do this for a Grid, but don’t know how to do it for a Label or a Textfield.

In Grid;

{ text: "Book Name", dataIndex: 'bookname'},

But, how can we add values to Label and textfields.

UPDATE

i am still having the problem. I am unable to set the values to the Label. (after loading it from STORE). The Label gets displayed but it doesn’t get populated with the value that it got from STORE. There’s no error as such.

Ext.define('Ex.view.info', {
    extend: 'Ext.window.Window',
    alias: 'widget.info',
    initComponent: function() {
        var st = Ext.getStore('peopleinformation');
        st.load();
        this.items = [
            {

                xtype: 'label',
                forId: 'myFieldId',
                text: 'My Awesome Field',
                name: 'personfirstname',
                margins: '0 0 0 10'

            }
        ];
        this.callParent(arguments);
    }
});
  • 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-07T05:42:54+00:00Added an answer on June 7, 2026 at 5:42 am

    For just setting a value for label , you can use setText method described in label
    http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.Label-method-setText

    yourLabel.setText('value');
    

    For textField – http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.field.Text-method-setValue

    UPDATE:

    // in your store
     proxy: {
        type: 'ajax',
        url: 'you url',
        method: 'GET',
        headers: { 'Content-Type': 'application/json' },  //your response type like xml, json        
        reader: { type: 'json',            
            getResponseData: function (response) {
                var data = Ext.decode(response.responseText);
                //loop here , if more labels are there
                // get the object referance of label and update that
            }
        }
    

    UPDATE:
    do you tried:

     text: st.yourFieldName,
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to auto-populate the tinymce editor from the ASP.NET MVC model?
I know this has been asked in various ways, but I have not been
I have a movie database where I need to populate with data so it
I need to dynamically populate a form from fields in a database using EXT
I need to populate a couple of tables from a db that was created
Actually I need to populate MySQL database from a SQL file which was generated
I need to populate an aspx page with dozens of properties from a db
I need to populate a context menu from a database at run time. I
Find the field names of inputtable form fields in a PDF document? I have
My requirement is I need to populate dyanamic graphs in a jsp page. I

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.