extjs-mvc

Rendering ExtJS 4+ MVC application in a html div - how-to?

允我心安 提交于 2019-12-03 10:03:33
问题 All examples that I have found so far explain how to render ExtJS (4.2) MVC application within the "viewport", which in other words means full browser screen, and occupying whole HTML BODY. I would like to render application within the existing HTML page within named DIV, so that I can have HTML design around the application. <div id="appdiv"><!-- application runs here --></div> I've seen some sites with ExtJS 4 examples that use trick to render ExtJS app within the page by using IFRAME. Is

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

蹲街弑〆低调 提交于 2019-12-03 05:33:46
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. This application is a single-page client-side Javascript application. The ExtJS 4 MVC model expects you

Rendering ExtJS 4+ MVC application in a html div - how-to?

不想你离开。 提交于 2019-12-03 00:33:52
All examples that I have found so far explain how to render ExtJS (4.2) MVC application within the "viewport", which in other words means full browser screen, and occupying whole HTML BODY. I would like to render application within the existing HTML page within named DIV, so that I can have HTML design around the application. <div id="appdiv"><!-- application runs here --></div> I've seen some sites with ExtJS 4 examples that use trick to render ExtJS app within the page by using IFRAME. Is it possible to avoid IFRAME? And, if it is, how skeleton of ExtJS 4.2 application shall look like if it

load new view after the loginin extjs 4 mvc

☆樱花仙子☆ 提交于 2019-12-03 00:05:00
问题 I have a login view created in extjs 4 and the data is fetched from mysql. What my issue is that i am not able to redirect my page after the sucessfull login. My code to redirect is. onLoginSuccess : function(response, opts) { //Received response from the server response = Ext.decode(response.responseText); if(response.success) { var redirect = 'index'; window.location = redirect; } else { Ext.MessageBox.alert('Login failed', response.message); } } 回答1: There are two ways to approach this:

How can I add GeoExt3 to Extjs 6 MVVM architecture?

梦想与她 提交于 2019-12-02 10:34:52
问题 I want to develop an Extjs 6 application with MVVM architecture. In this application, I want to use GeoExt 3. I don't know what to do to add GeoExt 3 library to application? How can I do it? 回答1: You must create a package with GeoExt3. For packaging in Extjs-6 read heer. How to package GeoExt using sencha command Install sencha cmd from here (tested with the version 6, only as preview right now). To generate a package you usually first create a sencha workspace by issuing sencha -sdk /path/to

How can I add GeoExt3 to Extjs 6 MVVM architecture?

二次信任 提交于 2019-12-02 02:47:58
I want to develop an Extjs 6 application with MVVM architecture. In this application, I want to use GeoExt 3 . I don't know what to do to add GeoExt 3 library to application? How can I do it? You must create a package with GeoExt3. For packaging in Extjs-6 read heer . How to package GeoExt using sencha command Install sencha cmd from here (tested with the version 6, only as preview right now). To generate a package you usually first create a sencha workspace by issuing sencha -sdk /path/to/ext-n.n.n generate workspace /path/to/workspace Inside of the workspace clone the geoext3 repository into

Can't resolve “c is not a constructor” error

眉间皱痕 提交于 2019-12-02 02:01:05
问题 I'm trying to build a very very basic "proof of concept" app using ExtJS but i'm having a very hard time. All i want is two grids getting their data from a remote JSON file, but no matter what i do i keep on getting the error that's in the subject. Here is my simple code: app.js: Ext.Loader.setConfig({enabled:true}); Ext.application({ name: 'GeoSniffer', autoCreateViewport: true, models: ['Location', 'Client'], stores: ['Locations', 'Clients'], }); Viewport.js Ext.define('GeoSniffer.view

TreeGrid: setting data root has no effect

一笑奈何 提交于 2019-12-02 01:44:06
问题 I'm trying to setup a TreeGrid, my data object looks like this: { "code": "success", "data": { "text": ".", "children": [ { "clientname": "Market", "contact": "OpenX Market Advertiser", "email": "asdasd@asdasd222.de", I need to tell Ext that it should use data as the root element: var store = Ext.create('Ext.data.TreeStore', { model: 'Task', proxy: { type: 'ajax', url: 'http://localhost/rocketads/trunk/advertisers/index/stats:true/', reader:{ type:'json', root:'data' } }, }); This doesn't

how to get Extjs 4 store's request data on beforeload event?

梦想与她 提交于 2019-12-01 22:38:11
I'm trying to get request data params beforeload event on store. I can see the operation object contains the request data but I can't seems to get it from operation object Ext.create('Ext.data.Store', { autoLoad : true, fields : [ {name: 'item_code', type: 'string'}, {name: 'quantity', type: 'int'}, {name: 'description', type: 'string'} ], storeId : 'summary', proxy : { type : 'ajax', actionMethods : 'POST', extraParams : {'filter': 'branch', 'branch': location }, url : 'reports/stock_summary', reader: { type : 'json', root : 'data' } }, listeners: { beforeload: function(store, operation,

TreeGrid: setting data root has no effect

六眼飞鱼酱① 提交于 2019-12-01 22:37:15
I'm trying to setup a TreeGrid, my data object looks like this: { "code": "success", "data": { "text": ".", "children": [ { "clientname": "Market", "contact": "OpenX Market Advertiser", "email": "asdasd@asdasd222.de", I need to tell Ext that it should use data as the root element: var store = Ext.create('Ext.data.TreeStore', { model: 'Task', proxy: { type: 'ajax', url: 'http://localhost/rocketads/trunk/advertisers/index/stats:true/', reader:{ type:'json', root:'data' } }, }); This doesn't work for me although I'm successfully using this with normal Stores. Unfortunately with a TreeStore,