extjs-mvc

Explain MVC architecture of extjs

二次信任 提交于 2020-01-01 08:54:09
问题 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 someone please explain the MVC Architecture of Extjs based on my Sudoku app? The design of my sudoku app code is as follows: The description of the above design is as follows: container (blue) --> parent panel (grey) --> child panel (red) The "

EXT JS 4 use an model association to render a grid display value

巧了我就是萌 提交于 2020-01-01 05:31:07
问题 Details I have a grid used to display invoice information. The grid is populated using the Invoice store, the Invoice store uses the Invoice model, the Invoice model has a "has one" association with the InvoiceStatus model with a primary key of 'id' and a foren key of 'invoice_status_id'. Problem I'm not sure how to make the display value of the Invoice Grid's 'Status' column use the associated models 'name' inserted of the invoice_status_id. I know I need to create a renderer to do this

ExtJS Architecture for Multi Page Application

情到浓时终转凉″ 提交于 2019-12-30 06:38:00
问题 I have a .NET application in which most of the UI is custom. On some of the pages, I am using ExtJS4 components, such as Grid, to display a table of Users for example. I also have another page where I display a user profile, and another page where I display an application form. There are many other pages that don't use ExtJS. I sparingly use ExtJS components and would like to have re-usable code for Stores and Models across all the pages where I use ExtJS. I am familiar with ExtJS MVC

How to set custom folder names for views stores and models on ExtJs 4 application?

懵懂的女人 提交于 2019-12-25 14:11:29
问题 I ask this because there is an existing application that I would like to enable for using Sencha CMD so first step is to instantiate it via: Ext.Application which presents the first problem: folder structure is someApp --Views --Model --Store --moreFolders (should be model, store, view) Rather than refactoring hundreds of classes(huge app) I want to set the folders path if possible. Can you think in any drawbacks? What would your approach be? Any ideas are very well received. Using ExtJs 4.1

How to set custom folder names for views stores and models on ExtJs 4 application?

冷暖自知 提交于 2019-12-25 14:11:13
问题 I ask this because there is an existing application that I would like to enable for using Sencha CMD so first step is to instantiate it via: Ext.Application which presents the first problem: folder structure is someApp --Views --Model --Store --moreFolders (should be model, store, view) Rather than refactoring hundreds of classes(huge app) I want to set the folders path if possible. Can you think in any drawbacks? What would your approach be? Any ideas are very well received. Using ExtJs 4.1

How to get plugin from component using component query on Extjs 4.1?

半世苍凉 提交于 2019-12-25 05:26:07
问题 I want to add event listener to plugin on Controller.like http://docs.sencha.com/ext-js/4-1/#!/api/Ext.app.Controller It seems different to get plugin using component query than normal component. Is it possible to get plugin from component using component query? Here is my component Ext.define('App.view.file.List',{ rootVisible: false, extend:'Ext.tree.Panel', alias:'widget.filelist', viewConfig: { plugins: { ptype: 'treeviewdragdrop', allowParentInsert:true } }, //etc ... Can i get

window not showing the updated data based on grid row double clicked

喜你入骨 提交于 2019-12-25 00:48:41
问题 I am having one grid containing all project details. This grid has its own controller, models, stores. When I double click on the grid it passes the id to my server side. Based on the id passed I execute some query to my database and then returned the data back to client in JSON format. And based on successful response I show another window, which contains all the data returned back from server to client. But the main problem is that the window popup doesn't contain the updated data. Means

Customize the Loader for a MVC App

你。 提交于 2019-12-24 10:16:22
问题 I need to use a customize path for the Ext.Loader in my MVC project. I've already looked through the API and found nothing useable. If I set the loader directly it gets simply overriden, as it seems by the MVC app settings. So how can I customize the loader path for a MVC app? In addition: It would be awesome if the loader could be tweaked to sumarize multiple requirements that occours by the same source into one request. Would that be possible? Thanks in advance for any suggestions Edit The

Add Flex value dynamically to controller in extjs

谁说我不能喝 提交于 2019-12-23 16:34:42
问题 I am giving some items (containers), in "View", a layout of hbox . Now I want to give flex value to each item through the "Controller". How can I do this? I have gone through the docs but can't find any method like setFlex . EDIT : Ext.apply(Ext.getCmp('IdHere'), {flex: 1}); I have got the answer from this link. But now the problem is that even I am changing the flex values dynamically, the view of the containers is not changing. It is remaining same. I am not assigning flex values initially

View Reference in Controller EXTJS 4

会有一股神秘感。 提交于 2019-12-23 09:38:53
问题 I am not able to get combobox value in a controller. The getter method of combobox view returns function i(){ return this.constructor.apply(this,arguments)||null } instead of view object instance. If I use var combo=this.getColumnTypeComboView().create() then I don't get selected value of the combobox combo.getValue() . 回答1: To get view reference in a controller simply use getView() method from the Controller class. To create a connection between view and a controller make sure that you