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
0
votes
1 answer

ExtJS MVC -- Correct Way to launch dynamic modals

I'd like to use a single function onLaunchWindow() to launch different unique windows. The event is fired in the view and handled by a switch statement in the controller. In this example I'm firing an "add" event. I'd like to expand on this and…
Cadean
  • 61
  • 5
0
votes
1 answer

Extjs MVC - having a special cotroller per tab in tabpanel

I have a MainController that listens to events in the entire app (globally). My app has tab panel, and each panel is very complex and need to have its own controller (a lot of evets). How will I add a special controller per tab panel to handle its…
SexyMF
  • 10,657
  • 33
  • 102
  • 206
0
votes
2 answers

How do I require a login view in ExtJS 4

I have these files in this folder structure: -application --view ---Login.js ---Viewport.js --app.js -extjs -index.html Login.js Ext.define('BBP.view.Login', { extend: 'Ext.window.Window', alias: 'widget.Login', initComponent: function() { …
murtho
  • 991
  • 1
  • 17
  • 38
0
votes
2 answers

Ext JS: Assign a variable to data from store

I want to change the value in one of my views of my project depending on the user's url. Currently, I have a store class that loads in the url dynamically using the loadStore method. Ext.define('store.app.appStore', { extend : 'store.Store' , model…
JJI90
  • 59
  • 8
0
votes
0 answers

ExtJS - Writing code in Ext.onReady vs ExtJS view

Please check this fiddle and see how I have written code inside Ext.onReady function. While this code is working fine, If I need to write the same code inside a ExtJs view, How can I modify the existing code to include the grid and the group feature…
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
0
votes
1 answer

Using Sencha Architect 3 with visual studio 2012

I am about to make a new project, where the frontend has to be using Extjs and the backend has to be using C#. I need some kind of MVC structure. As I am completely new to Extjs and Sencha, I was wondering if it was possible to use sencha architect…
M.frank
  • 145
  • 2
  • 14
0
votes
1 answer

Get view (chart) item from controller

I have a chart with a text item : Ext.define('MyProject.view.DrawChart', { extend: 'Ext.chart.Chart', alias: 'widget.drawchart', requires: ['Ext.chart.*', 'Ext.data.*', 'Ext.layout.container.Fit'], default chart settings here …
salamey
  • 3,633
  • 10
  • 38
  • 71
0
votes
1 answer

Ext js summaryRenderer function not calling

This is my view Ext.define('view.OrdersGrid', { extend: 'Ext.grid.Panel', alias: 'widget.ordersgrid', store: 'TicketOrders', features:[ { ftype: 'groupingsummary', groupHeaderTpl: [ …
Noor
  • 39
  • 2
  • 7
0
votes
0 answers

how to convert this extjs app.js file into MVC pattern of EXTJS

js file here i created three tabs inside three tab's again i created some panels in one file. Right now i want to change this file into MVC architecture for EXTJS. So, please tell me. Ext.onReady(function() { …
javagroup
  • 1
  • 2
0
votes
1 answer

How to add associations in Model dynamically in extjs

I want to add the associations on model based on the value of a field. For example: I want to add associations like Parent Model: Ext.define('App.model.parentModel', { extend: 'Ext.data.Model', requires: [ 'App.model.ChildModel1', …
0
votes
1 answer

EXTJS localization (override classes)

I have a simple ExtJS Tree. Everything works. In API, I see that I can change titles and other labels by overriding it. Here is the API link Ext.require(['*']); var path = ""; Ext.onReady(function () { Ext.define('My.Tree', { extend:…
grep
  • 5,465
  • 12
  • 60
  • 112
0
votes
1 answer

I can not get the value of a text field in extJS

Faced with a problem at work with ExtJS There is such a code - a new class (view) Ext.define('FormApp.view.ElementContainer', { extend: 'Ext.Container', alias: 'widget.elemcontainer', initComponent: function() { this.items = [{ …
Ghost Rider
  • 205
  • 1
  • 4
  • 13
0
votes
0 answers

extjs - Menu definition, what is best practice following MVC principles?

I look for the best method to define the menu actions in ExtJS 4.2. I used to define the menu action with the handler configuration : items: [{ text: 'About...', icon: Paths.img + 'information.png', handler:…
Lorenz Meyer
  • 19,166
  • 22
  • 75
  • 121
0
votes
1 answer

Set URL prefix for ExtJS

I have an ExtJS 4 project using MVC architecture. The server URL to the project is http://myServer/myProject, but ExtJS is ignoring the project name, giving me a 404 error (cannot find http://myServer/app/view/Viewport.js) How do I tell ExtJS to…
Cavyn VonDeylen
  • 4,189
  • 9
  • 37
  • 52
0
votes
1 answer

ExtJS 3 Code Architecture : Best way to organize class files and load them dynamically

I'am modernizing a legacy web application, with its frontend based on ExtJS 3.x. Currently, user interface depends on large file of several thousand lines, with too many nested anonymous functions, encapsulated in an global `Ext.onReady()̀ per file.…
Koryonik
  • 2,728
  • 3
  • 22
  • 27