extjs-mvc

path of view is incorrect in extjs 4 mvc application

99封情书 提交于 2019-12-06 11:12:01
I'm trying to deploy my mvc app into my large web application. I have defined the app folder and can see in fire bug that it is calling the correct files with the exception of the initial view. So "App.view.Jobs" is calling https://www.estore.localhost/Jobs/Edit/ext/jobs/App/view/Jobs.js?_dc=1328471746967 when i would like it to call https://www.estore.localhost/ext/jobs/App/view/Jobs.js?_dc=1328471746967 Ext.Loader.setConfig({ enabled: true }); Ext.application({ name: 'MyApp', appFolder: '/ext/jobs/app', models: ['Part', 'Material', 'Job', 'Process'], stores: ['SalesContact', 'Parts',

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

拈花ヽ惹草 提交于 2019-12-06 02:16:10
问题 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({ requires: [ 'Ext.container.Viewport', ], name: 'APP', appFolder: 'app', controllers: [ 'Main' ], launch: function() { Ext.create('Ext.container.Viewport', { layout: 'fit', items: [ { xtype: 'main' } ] }); } }); where main above is an xtype for an MVC view,

extjs4 global network exception listener

好久不见. 提交于 2019-12-05 20:01:59
I want to write a listener that will listen to all network requests errors, something like this : Ext.Ajax.on('requestexception', function(conn, response, options) { if (response.status === 555) { Ext.Msg.alert('test', 'test'); } }); The above code works only for requests via Ext.Ajax.request() , how to rewrite it so it could work also for form submits, url not found error etc. On server side I have Spring MVC that dispatches all requests and if there is any error , the response status of 555 is returned. form.submit({ url: dispatcher.getUrl('savePlanRequest'), //headers: {'Content-Type':

ExtJS 4.0.7 Load complete TreePanel

為{幸葍}努か 提交于 2019-12-05 15:18:10
I am in trouble with the ExtJS 4.0.7 TreePanel. I would like to load the complete tree from on JSON request. The request returns the following: { "data": { "children": [ { "text": "OS", "leaf": false, "children": [ { "text": "Hostname", "leaf": false, "children": [ { "text": "hostname.int.com", "leaf": true, "children": [] } ] } ] } ] } } With it doesn't work with the following store configuration (or any other i've tried) Ext.define('My.store.SysInfo', { extend: 'Ext.data.TreeStore', model: 'My.model.SysInfo', proxy : { type : 'ajax', url : '/sysinfo/getSysInfo.php', reader : { root : 'data'

Extjs grid column header, add dropdown menu item to specific columns

拟墨画扇 提交于 2019-12-05 10:02:56
I'm trying to add a button to the column header drop-down menus in my grid. However, I only want to add it to columns with certain itemId. So far I've got it working to add the button to all columns, see code below. I dont see where I could check each column's itemId though, it doesn't seem to iterate through the columns. Is there any workaround for this? Thank you! items:[{ region:'center', xtype:'grid', columns:{ items: COLUMNS, //defined in index.php }, store:'Items', selType: 'checkboxmodel', listeners: { afterrender: function() { var menu = Ext.ComponentQuery.query('grid')[0].headerCt

Render customize component inside XTemplate

纵饮孤独 提交于 2019-12-04 19:28:50
Ext.define('GB.view.DigestList',{ extend: 'Ext.panel.Panel', alias:'widget.digestlist', items:[ { xtype:'dataview', store: 'GB.store.Digests', tpl: new Ext.XTemplate( '<tpl for=".">', '<div class="container">', '{name}', '<div class="davidfun"></div>', '</div>', '</tpl>' ), listeners: { viewready: function(){ var home_d = Ext.create('GB.view.MyOwnDigest'); home_d.render(Ext.query('.davidfun')[0]); // home_d.render(Ext.getBody()); <- it'll work fine with this line }, } }], bind: function(record, store) { this.getComponent(0).bindStore(record); } }); Ext.define('GB.store.Digests', { extend:'Ext

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

让人想犯罪 __ 提交于 2019-12-04 07:58:50
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({ requires: [ 'Ext.container.Viewport', ], name: 'APP', appFolder: 'app', controllers: [ 'Main' ], launch: function() { Ext.create('Ext.container.Viewport', { layout: 'fit', items: [ { xtype: 'main' } ] }); } }); where main above is an xtype for an MVC view, that might extend an ExtJS Panel etc. Does a standard approach for this ubiquitous requirement exist?

Explain MVC architecture of extjs

跟風遠走 提交于 2019-12-04 02:57:59
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 " parent panels " are nine and each " parent panel " has nine " child panels ". The HTML elements of "

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

纵然是瞬间 提交于 2019-12-03 17:13:32
问题 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 getting either a light bulb or a confirmation. Problem Your application has the ability to open many different views, some of which themselves are mini-applications. Additionally, a user may wish to have multiple concurrent copies of a view open.

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

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 14:59:48
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 however I still get a null value. Both the Invoice and InvoiceStatus stors are populating with the correct