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

  • Home
  • SEARCH
  • 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 6096949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:59:12+00:00 2026-05-23T12:59:12+00:00

I’m teaching myself ExtJS by building a really simple ‘scrum’ development tracking application. I’m

  • 0

I’m teaching myself ExtJS by building a really simple ‘scrum’ development tracking application. I’m currently displaying the “Backlog” as a grid panel that displays the properties of the card(user story).

Card.js (Card model)

Ext.define('AM.model.Card', {
    extend: 'Ext.data.Model',
    fields: [
                'id',
                'name',
                'priority_id',
                ...
            ]
});

Priority.js (Priority model)

Ext.define('AM.model.Priority', {
    extend: 'Ext.data.Model',
    fields: [
                'id',
                'name',
                'short_name'
            ]
});

So the data for the card will look something like this:

backlogcards.json (data)

{
    success: true,
    backlogcards: [
        {
            id: 1, 
            name: 'ONEs',
            priority_id: 2,
            ...
        },
        {
            id: 2, 
            name: 'TWOs',
            priority_id: 3,
            ...
        }
    ]
}

And the priorities looks like this:

priorities.json (data)

{
    success: true,
    priorities: [
        {
            id              : 1, 
            name            : "High",
            short_name      : "H"
        },
        {
            id              : 2, 
            name            : "Medium",
            short_name      : "M"
        },
            {
            id              : 3, 
            name            : "Low",
            short_name      : "L"
        }
    ]
}

So ideally what I would like to do is have the grid panel display the short_name for the corresponding priority_id. When the item is clicked on to be edited inline, a combo box will be displayed that shows the name property. I’m half way there already.

BacklogList.js (view)

Ext.define('AM.view.card.BacklogList', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.backlogcardlist',

    title: 'Backlog',
    store: 'BacklogCards',

    selType: 'cellmodel',
    plugins: [
        Ext.create('Ext.grid.plugin.CellEditing', {
            clicksToEdit: 1
        })
    ],

    columns: [
        { header: 'ID', dataIndex: 'id' },
        { header: 'Name', dataIndex: 'name', field: 'textfield' },
        {
            header: 'Priority',
            dataIndex: 'priority_id',
            width: 130,
            field: {
                xtype: 'combobox',
                typeAhead: true,
                store: 'Priorities',
                displayField: 'name',
                valueField: 'id',
                listClass: 'x-combo-list-small'
            }
        }
    ]

});

So I know the ‘dataIndex’ property is what I need to modify in order to change the display, but I’m not sure how to tie those two stores together.

Row Editing

As you can see above, priority is being displayed as a number instead of the short_name.

Is this a situation where I would need to use associations? (I only know OF them) Sencha Docs

Thank you!

EDIT1: Oh I realize I could ‘hard code’ a renderer property that does this change, but I would like to avoid that and instead use values from the priorities store.

    renderer: function(value){
        if (value==3)
        {
            return "L";
        }
        else if (value==2)
        {
            return "M";
        }
        else
        {
            return "H";
        }
    },

EDIT2 for Evan:
Priorities store

Ext.define('AM.store.Priorities', {
    extend: 'Ext.data.Store',
    model: 'AM.model.Priority',
    autoLoad: true,

    proxy: {
        type: 'ajax',
        api: {
            read: 'app/data/priorities.json',
            update: 'app/data/updateUsers.json'
        },
        reader: {
            type: 'json',
            root: 'priorities',
            successProperty: 'success'
        }
    }
});

The store.each refers to this store, right? If so, how do I perform the each operation on it?

I tried changing the declaration line to:

var test = Ext.define('AM.store.Priorities', {

And then tried changing your code to test.each but was unsuccessful.

Thanks again!

  • 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-05-23T12:59:13+00:00Added an answer on May 23, 2026 at 12:59 pm

    You need to use a renderer, however there’s nothing stopping you from looping over the values in the priorities store and checking, something like:

    renderer: function(value) {
        var display = '';
        store.each(function(rec){
            if (rec.get('id') === value) {
                display = rec.get('name');
                return false;
            }
        });
        return display;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

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.