Questions tagged [extjs-mvc]

Attempt to implement MVC-like pattern in ExtJS framework, using the terms from the pattern and some of the concepts.

The following is how ExtJS defines "MVC" in their codebase:

Model is a collection of fields and their data (e.g. a User model with username and password fields). Models know how to persist themselves through the data package, and can be linked to other models through associations. Models work a lot like the Ext JS 3 Record class, and are normally used with Stores to present data into grids and other components

View is any type of component - grids, trees and panels are all views.

Controllers are special places to put all of the code that makes your app work - whether that's rendering views, instantiating Models, or any other app logic.

651 questions
6
votes
2 answers

How to perform View-Controller separation when using an "actioncolumn" (Ext.grid.column.Action)

In ExtJS 4, I have a grid that contains an action column. Whenever that action is triggered, I want to execute "my action". Without MVC, this would look like this: /* ... */ { xtype: 'gridpanel', columns: [ …
vog
  • 23,517
  • 11
  • 59
  • 75
6
votes
2 answers

In an Ext JS 4 MVC app, what should be responsible for loading stores?

Consider a complex application where you have custom filtering logic and different modes of loading; delayed loading when hidden, no loading when hidden, but load when it's shown and reloading when your custom filters are modified etc. What part of…
Gaute Løken
  • 7,522
  • 3
  • 20
  • 38
6
votes
4 answers

ExtJS how to handle a component's element-related events in controller?

I have a Panel and I need to capture/handle the mouseover event for the element of this panel. Currently I do this by extending the ExtJS Panel with the following listener (as suggested here): ... listeners: { mouseover : { element :…
Joseph Victor Zammit
  • 14,760
  • 10
  • 76
  • 102
6
votes
3 answers

How to tackle ExtJS "Synchronously loading" warning

When using ExtJS 4+ with asynchronous loading one would be familiar with this sort of warning: [Ext.Loader] Synchronously loading 'MY.particular.module'; consider adding Ext.require('MY.particular.module') above Ext.onReady How to identify which…
Joseph Victor Zammit
  • 14,760
  • 10
  • 76
  • 102
6
votes
1 answer

Extjs4 MVC, Ext.define() and Ext.create()

Firstly, My question is I want to know how different between Ext.Define() and Ext.Create(), and I want to know how to use them in right way. I reviewed my codes and many Extjs4 MVC tutorials, and I found many many Ext.define() methods in Extjs4 MVC…
Expert wanna be
  • 10,218
  • 26
  • 105
  • 158
6
votes
2 answers

ExtJS 4.1 MVC: How to apply LoadMask to viewport while loading?

How to apply a LoadMask for a standard ExtJS MVC application's viewport while it is loading the required files? An example of such MVC application is the following snippet for app.js: Ext.Loader.setConfig({enabled:true}); Ext.application({ …
Joseph Victor Zammit
  • 14,760
  • 10
  • 76
  • 102
6
votes
2 answers

ExtJS4 - Store per panel instance?

I'm really new to the MVC pattern in Ext. I have a tabpanel with multiple instances of the same component (let's call it product), each should call the server when it's opened, with an id parameter. Right now, in order to create these tabs - I use…
Madd0g
  • 3,841
  • 5
  • 37
  • 59
5
votes
1 answer

Override Ext.data.Connection - Best Practice

I need to override Ext.data.Connection to show a Login Form. I do this at the moment in Ext.application.launch which works as expected. Is it possible to swap this piece of code somewhere different like in an extra file?
Julian Hollmann
  • 2,902
  • 2
  • 25
  • 44
5
votes
1 answer

creating all classes from sencha sdk

I'm trying to use the sencha sdk to generate my minified file. I have my page set up on http://www.mysite.localhost/ext/jobs/index.html reading from just index.html is not easily possible. When i enter sencha create jsb -a…
frosty
  • 5,330
  • 18
  • 85
  • 122
5
votes
1 answer

relative paths using extjs 4

My directory structure looks like follows. (i'm using ext mvc ) www.mysite.com/ext/designer.js www.mysite.com/ext/app/view www.mysite.com/ext/app/store I have the js declared here