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.

650 questions
26
votes
3 answers

EXTJS 4 - Global exception listener

I have a situation where I am making ajax requests to a server from various Ext gridpanel etc. In an Admin area. The logged in user will be logged out if there is no activity for eg. 5 minutes which is normal. In this case the server sends back a…
user798612
  • 327
  • 2
  • 4
  • 5
20
votes
2 answers

ExtJS: What's the point of requires?

I've been trying to figure out what requires does in Ext JS 4, and I can't seem to come up with a reasonable answer. Let's say I have the following code: app.js Ext.Loader.setConfig({ enabled: true }); Ext.Loader.setPath('Ext.ux',…
incutonez
  • 2,821
  • 6
  • 39
  • 77
19
votes
5 answers

Attach ExtJS MVC controllers to DOM elements, not components

Is there a way to use the Ext.app.Controller control() method, but pass in a DOM query? I have a page that contains standard links and would like to add a click handler to them even though they were not created as Ext Buttons. I've tried…
Nathan Voxland
  • 13,759
  • 1
  • 44
  • 60
14
votes
7 answers

ExtJS 4 MVC multiple instances of views and sub/child controller difficulties

I have encountered a problem with the MVC pattern in ExtJS 4. At least, I think I have. Having approached multiple people with this question, and having posted numerous times in the Sencha forums, I am now turning to a broader audience in hopes of…
aenigmatic
  • 151
  • 1
  • 1
  • 7
14
votes
4 answers

How to align elements in a toolbar to left, middle, right

How can I have the three regions left, middle, right within a toolbar? I know that I can use -> to trigger the right aligned container for all following items but what about center?
seba
  • 974
  • 1
  • 10
  • 30
10
votes
2 answers

How to create hyper link in ExtJS 4?

I am working in ExtJS 4.I have been getting stuck at a point where I have to create a hyperlink in ExtJS 4.I have been searching a lot for creating hyperlink in ExtJS 4 but I did not get any solution for it.Actually I have to create a hyperlink and…
Pravin Mane
  • 529
  • 4
  • 13
  • 25
10
votes
2 answers

Always show the tip text of Slider in Extjs

In Extjs 4.1.1a, How to keep the tip text of the slider always visible? Currently, the tip text is being visible whenever the user drags the bar of the slider. I searched on docs but couldn't find any related concepts. If it is not documented or not…
Mr_Green
  • 36,985
  • 43
  • 143
  • 241
10
votes
2 answers

Explain MVC architecture of extjs

I created a small sudoku app using Javascript. Now I am trying to convert that javascript code into extjs (4.1.1a) code. I have gone through the docs to understand the MVC Architecture, but it seemed not so detailed for me as I am a beginner. Can…
Mr_Green
  • 36,985
  • 43
  • 143
  • 241
10
votes
1 answer

How to Profile (Debug) ExtJS EventPipe / Events

I am working on a relatively large ExtJS MVC application with around >40 Controllers, >100 Stores, >100 Models and so on. I don't follow the possible MVC way strict so I implemented a lazy controller initialization which initialize the controller…
sra
  • 23,629
  • 7
  • 52
  • 88
9
votes
2 answers

Extending controller in ExtJS 4 MVC application

I building my ExtJS 4 application following the MVC structure. I want to make an extendable grid MyGrid with some functionality that I can reuse several times. Therefore, I guess, it should have its own controller which is also extended, so that the…
Louis
  • 794
  • 8
  • 11
9
votes
4 answers

ExtJS 4 - Update/Refresh single record

I have a problem that's bugging me. I have a grid and when i dblclick on a item I want to open a window to edit that item. Pretty standard stuff. The problem is, i want to be sure the record is up to date, because other people using the program may…
Mario Cesar
  • 3,551
  • 4
  • 20
  • 34
9
votes
3 answers

extjs model associations in a list view

I have two models: Page and Department. I am showing pages in a list view in extjs and I would like to display the Department's Name instead of the department_id in the List view. I have not gotten to the part of actually adding the department to…
jdkealy
  • 4,425
  • 6
  • 30
  • 52
9
votes
4 answers

Where to add Global variables in ExtJS MVC?

I am wondering where to add global variables for an ExtJS Application. I already looked at some suggestions in stackoverflow that mention that you can add them inside app.js. But, can anyone be more specific? My app.js looks something like…
Art F
  • 3,572
  • 10
  • 45
  • 74
8
votes
2 answers

Using more than one controller with ExtJS 4 MVC

Let's say I have a main controller, then my application has a controller for each "module". This main controller contains the viewport, then a header (with a menu) + a "centered" container, which is empty at the beginning. A click in the menu will…
TigrouMeow
  • 960
  • 3
  • 16
  • 28
8
votes
2 answers

ExtJS 4 - how to call function from a certain controller in different views

I have a function which is described in one of my controllers. The function takes care of creating a form that I need to use in different cases, from different views. Is it possible and what is the way to call this function from the views that I…
Leron_says_get_back_Monica
  • 8,874
  • 33
  • 135
  • 238
1
2 3
43 44