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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:08:59+00:00 2026-05-24T23:08:59+00:00

I’m having trouble understanding how I need to define and use the MVC model

  • 0

I’m having trouble understanding how I need to define and use the MVC model for my test EXTjs4 app. Consider the following structure.

app.js

Ext.application({
    name: 'AM',
    appFolder: 'app',
    controllers: ['Cards', 'Fourscrum'],
    launch: function () {
        Ext.create('Ext.container.Viewport', {
            defaults: { flex: 1 },
            layout: {
                type: 'hbox',
                align: 'stretch',
            },
            items:
            [
                Ext.widget('Fourscrum')
            ]
        });

Controller:

Cards.js

Ext.define('AM.controller.Cards', {
    extend: 'Ext.app.Controller',
        stores: ['BacklogCards', 'InprogressCards', 'ReviewCards', 'DoneCards', 'Cards', 'Priorities', 'Sizes'],
        models: ['Card', 'Priority', 'Size'],
        views: ['card.List', 'priority.prioritycombo', 'card.Edit'],

Fourscrum.js

Ext.define('AM.controller.Fourscrum', {
    extend: 'Ext.app.Controller',
    stores: ['BacklogCards', 'InprogressCards', 'ReviewCards', 'DoneCards', 'Cards', 'Priorities', 'Sizes'],
    models: ['Card', 'Priority', 'Size'],
    views: ['scrum.Fourscrum', 'card.List'],

view.scrum.Fourscrum.js

Ext.define('AM.view.scrum.Fourscrum', {   // *** Variable
    extend: 'Ext.panel.Panel',
    alias: 'widget.Fourscrum',       // *** Variable

    width: 400,
    height: 300,

    layout: 'column',

    title: 'Scrum',                  // *** Variable
    items:
    [
        Ext.widget('cardlist',
        {
            alias: 'widget.backlogcardlist',
            title: "Backlog",
            store: 'BacklogCards'
        }),
        Ext.widget('cardlist',
        {
            alias: 'widget.backlogcardlist',
            title: "Backlog",
            store: 'BacklogCards'
        }),
        Ext.widget('cardlist',
        {
            alias: 'widget.inprogresscardlist',
            title: "In Progress",
            store: "InprogressCards"
        }),
        Ext.widget('cardlist',
        {
            alias: 'widget.reviewcardlist',
            title: "Review",
            store: "ReviewCards"
        }),
        Ext.widget('cardlist',
        {
            alias: 'widget.donecardlist',
            title: "Done",
            store: "DoneCards"
        })
    ]

});

My ideal structure for this app is as follows:

Viewport defined (inside app.js)

which contains a Fourscrum.js view (which is just a panel)

which contains 4 different List.js views (which are just grids).

Trying to accomplish this, I currently get a few errors when i start messing with the above code:

  1. Item undefined
  2. namespace undefined

Does anyone know why this doesn’t work?

PS. I can get this example to work if I replace my ‘cardlist’ widgets with panels directly defined in the Fourscrum view.

PPS. This also works properly if I forego the Fourscrum container panel all together 🙁

EDIT:

I felt my explanation was a little unclear so I’ve uploaded an image to help describe the program. I’m not sure where I need to define the stores, models, and views with this nested structure. So I’ve repeated it in both controllers. I hope that’s not what is causing the problem.

enter image description here

EDIT2:

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

    //title: 'List',
    //store: 'Cards',


    //multiSelect: true,
    viewConfig: {
        plugins: {
            ptype: 'gridviewdragdrop',
            dragGroup: 'ddzone',
            dropGroup: 'ddzone'
        }
    },
    //            selType: 'cellmodel',
    //            plugins: [
    //                Ext.create('Ext.grid.plugin.CellEditing', {
    //                    clicksToEdit: 1
    //                })
    //            ],

    columns: [
        {
            header: 'ID',
            dataIndex: 'external_id',
            field: 'textfield',
            width: 30
        },
        {
            header: 'Name',
            dataIndex: 'name',
            field: 'textfield',
            width: 150
        },
        {
            header: 'Priority',
            dataIndex: 'priority_id',
            renderer: function (value) {
                var display = '';
                Ext.data.StoreManager.get("Priorities").each(function (rec) {
                    if (rec.get('id') === value) {
                        display = rec.get('short_name');
                        return false;
                    }
                });
                return display;
            },
            width: 60,
            field: { xtype: 'PriorityCombo' }
        },
        {
            header: 'Size',
            dataIndex: 'size_id',
            renderer: function (value) {
                var display = '';
                Ext.data.StoreManager.get("Sizes").each(function (rec) {
                    if (rec.get('id') === value) {
                        display = rec.get('short_name');
                        return false;
                    }
                });
                return display;
            },
            width: 60
        },
        {
            xtype: 'actioncolumn',
            width: 16,
            items: [{
                icon: 'Styles/Images/zoom.png',  // Use a URL in the icon config
                tooltip: 'Zoom In',
                handler: function (grid, rowIndex, colIndex) {
                    var rec = grid.getStore().getAt(rowIndex);
                    alert("Edit " + rec.get('name'));
                }
            }]
        }
    ]

});
  • 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-24T23:08:59+00:00Added an answer on May 24, 2026 at 11:08 pm

    I think I see a big problem in your code (if you pasted all of it).
    In your view definitions if you are extending Ext components you MUST have the following function that ends in the callParent method like below.

    initComponent: function() {
      this.items = this.buildMyItems();  
    
      this.callParent(arguments);    
    },
    
    buildMyItems: function(){
      //my code
    }
    
    • 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
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;

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.