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
0 answers

What's a nice pattern for ExtJS View Component to have own private Controller?

I've some ExtJS 4 MVC apps that share certain custom view components. A shared component has its own namespace and is often sufficiently complex (e.g. with a large tree of descendant components that must be managed) that it warrants its own…
David Easley
  • 1,347
  • 1
  • 16
  • 24
0
votes
1 answer

ExtJS Default Headers (token authorization) Page Refresh

I have my ExtJS application that on success login I set an Authorization Token so I can send that on every Ajax Call to my server: success: function (response, opts) { var obj =…
VAAA
  • 14,531
  • 28
  • 130
  • 253
0
votes
0 answers

How to implement action role based on EXTJS

I'm building a new ExtJS4 MVC application with Web API (server side) that will have login and actions based on a user role. For example instead of having just roles like: Admin Administrative HumanResources I have a collection of actions and…
VAAA
  • 14,531
  • 28
  • 130
  • 253
0
votes
1 answer

ExtJS 4 Web Application State Management

I am creating an ExtJS 4 single-page web application, and coming across some issues deciding on the MVC-favoured way of defining and maintaining my application state. I am aware of the global nature of ExtJS 4's stores, and I like the idea of them,…
DavidH
  • 30
  • 7
0
votes
0 answers

button.form() is undefined

getting error at that button.up('form').getForm().reset(); is undefined.... functions of Submit - is send user details to server cancel button - it sgould reset form. // this is code of controller for login form..which consist of two event s for…
0
votes
1 answer

How to use ExtJS plugin 'Row Expander' with a MODx grid

I'm building an extra for MODx Revolution 2.2.x which uses ExtJS 3.4 as the front end. I have a grid that I need to use the "Row Expander" ExtJS plugin with, but I'm not sure how to translate the provided example…
Muzzstick
  • 304
  • 1
  • 2
  • 9
0
votes
1 answer

ExtJs loading nested JSON data MVC

I know this has been discussed a lot of times, but I just can't get my code working... So I have a PHP script which returns the following JSON. I want the data to be loaded in a grid like this: name | status | ztn | dtn | idn { "success":true, …
p4b4
  • 105
  • 2
  • 11
0
votes
1 answer

Extjs: how to use object key value with space in extjs tpl?

CODE : var data={"today date":'12-02-2014' ,"created date":'10-2-1014'} tpl= new Ext.XTemplate('','

{today date}

','

{created date}

','
'); here I have attached the…
user3062437
  • 347
  • 1
  • 2
  • 14
0
votes
2 answers

Getting data from web service using ajax

I'm trying to get data from a webservice using ajax and POST method. Ext.Ajax.request({ url: 'http://localhost......', method:'POST', success: function(response) { console.log(response.responseText); }, failure: function() {…
0
votes
1 answer

Maintaining view instances after switiching view

I have a few set of layouts in which the I rearrange a set of components (views) in different order. What I would like to achieve is that the same instance of the view should be rendered on different layouts so that the state of the view is…
0
votes
3 answers

Sending values from a view to another using EXTJS

Im' using EXT 4.2.0. I have 2 views : view 1 and view 2. In view 1 i have a Ext.grid.Panel which (in his associated controller) contains a selectionchange event lisetner . After selectionchange is triggred, i go the the view 2 in which i have a…
Monster
  • 179
  • 5
  • 20
0
votes
0 answers

ExtJs create store in view returns prototype not object

The Problem I want to create and assign a store to an Ext.grid.Panel. In the initComponent of the Panel when I create a new store with Ext.create() the prototype is returned and not the actual object. The used ExtJs Version is 4.1.1 with ext-dev.js…
And-y
  • 1,519
  • 2
  • 22
  • 33
0
votes
1 answer

Controller this.control() method extjs 4

I have a toolbar named DasboardToolbar in which i have a splitbutton. The problem when I click a menuitem in the splitbutton it fires a event which the controller's this.control method should catch but it doesn't. The object used for firing event is…
0
votes
1 answer

Making property as a reference to class instance in extjs

I want to create a utility class which can have just one instance(singleton) therefore I have made a static method called getInstance() which would create a instance and return it to me. I have posted below the code with a comment where i get and…
0
votes
1 answer

Exts4.2 MVC application minfication using JSBuilder2 and Maven

We have developed an application using Extjs 4.2 following MVC pattern. We have project folder setup as follwing: WebContent --> app -->controller -->model -->store -->view app.html app.js In app.js we have defined all models, controllers, stores…
rasaab
  • 31
  • 3