extjs-mvc

How to get application from view?

杀马特。学长 韩版系。学妹 提交于 2020-02-23 09:57:09
问题 How can I get my application from a view? For example consider I have an application Boo and there's a view that named Boo.view.Foo.List and I want to get Boo in the view List . Edit: See this code, and look at the line 20. Ext.define('Boo.view.Foo.List', { extend: 'Ext.panel.Panel', model: 'Boo.model.FooModel', alias: 'widget.foolist', store: 'FooListStore', initComponent: function () { this.columns = [ { text: "Hello world", dataIndex: 'Time', flex: 1 }, { xtype: 'actioncolumn', width: 50,

Override Ext.data.Connection - Best Practice

半腔热情 提交于 2020-01-10 15:41:32
问题 I need to override Ext.data.Connection to show a Login Form. I do this at the moment in Ext.application.launch which works as expected. Is it possible to swap this piece of code somewhere different like in an extra file? 回答1: If you need this only to recognize when user is not authenticated you might want to consider doing something else. Like adding a handler to Ajax singleton: function addAjaxErrorHandler(object) { Ext.Ajax.on('requestexception', function(conn, response, options, e) { var

Extjs4 Sending accented characters to the server

 ̄綄美尐妖づ 提交于 2020-01-06 11:23:02
问题 I am working with Extjs4. I am trying to send accented characters to server. I was trying to send ó. And what I was receiving at the server side was ó. I am sending it using Store proxy. In store proxy, I have added headers: { 'Content-Type': 'charset=utf-8' } Still it did not send the accented characters properly. How should I send accented characters to the server? Thanks in advance! 回答1: user2316489, IMHO this is a problem with your server configuration, rather than a front-end

Extjs4 Sending accented characters to the server

天涯浪子 提交于 2020-01-06 11:20:30
问题 I am working with Extjs4. I am trying to send accented characters to server. I was trying to send ó. And what I was receiving at the server side was ó. I am sending it using Store proxy. In store proxy, I have added headers: { 'Content-Type': 'charset=utf-8' } Still it did not send the accented characters properly. How should I send accented characters to the server? Thanks in advance! 回答1: user2316489, IMHO this is a problem with your server configuration, rather than a front-end

ExtJS 4 treepanel with checkbox issue

时间秒杀一切 提交于 2020-01-06 08:24:08
问题 We are using treepanel with check box in our application.It seems like: var treepanel = { id : 'tree', xtype : 'treepanel', store : layerStore, rootVisible : false, listeners : { checkchange : function(node,check){ if(node.get('id') == 'teacher'){ alert('you have selected teacher node'); }else if(node.get('id') == 'student'){ alert('you have selected student node'); } } } }; LayerStore code: var layerStore = Ext.create('Ext.data.TreeStore',{ root : { children : [ { text : 'teacher layer', id

extjs4 MVC Scope Issue

ε祈祈猫儿з 提交于 2020-01-06 07:58:10
问题 I am trying to call resetCombo method once i click on link from tooltip which is rendered on combo But i am not able to access it because of scope issue not sure what i am missing. Please help me on this. Ext.define('test.BasicForm', { extend: 'Ext.form.Panel', renderTo:Ext.getBody(), initComponent :function(){ this.items=[ { fieldLabel: 'Test', xtype: 'combo', displayField: 'name', width: 320, labelWidth: 130, store: [ [1, 'Value 1'], [2, 'Value 2'], [3, 'Value 3'], [4, 'Value 4'] ],

Reusable Action in Ext JS MVC

放肆的年华 提交于 2020-01-03 02:50:14
问题 I have a Grid Panel with a toolbar and an context menu. The toolbar has a edit button and the context menu has a edit menu item. Both shares the same properties (text, icon and handler) Ext has something called Action which makes it possible to share functionality etc. between components, but til now I have had no success getting it to work in the MVC architecture (I am using the new MVC architecture in 4.0) My Action class looks like this: Ext.define( 'App.action.EditAction', { extend: 'Ext

ExtJS 4.0.7 Load complete TreePanel

被刻印的时光 ゝ 提交于 2020-01-02 05:22:09
问题 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:

ExtJS 4 Application Login & Authentification & Rights

谁说我不能喝 提交于 2020-01-01 12:02:57
问题 I'm developing an web application on Ext JS 4 using the new recommended application structure. Therefore I need to implement a authentification & rights system. The idea so far: The server is responsible to ensure the user role and rights. ExtJS frontend has to change according to the permissions and role I use a card layout. The first tab is the login screen, the second the application In my controller I check if the user is logged in. If he has a valid identity I switch to tab 2. If not he

ExtJS 4 Application Login & Authentification & Rights

自作多情 提交于 2020-01-01 12:01:39
问题 I'm developing an web application on Ext JS 4 using the new recommended application structure. Therefore I need to implement a authentification & rights system. The idea so far: The server is responsible to ensure the user role and rights. ExtJS frontend has to change according to the permissions and role I use a card layout. The first tab is the login screen, the second the application In my controller I check if the user is logged in. If he has a valid identity I switch to tab 2. If not he