extjs4.2

extjs - how correctly call a controller method from another controller or closure

喜欢而已 提交于 2019-12-20 09:32:03
问题 I'm new to extjs and I'm using the MVC architecture. When my application references a method of a controller, I do it that way (in MyApp.Application ): Mb.app.getController('Main').myMethod(); It is already long, but I think this is the way to do. When a controller calls it's own method in a closure, I was led to use this code (in MyApp.controller.Main : controllerMethodOne: function(){ Ext.Ajax.request({ url: ..., params: ..., success: (function(response){ list = Ext.JSON.decode(response

Include an existing CSS file in custom extjs theme

[亡魂溺海] 提交于 2019-12-19 04:07:06
问题 I have an existing CSS file that I would like to include in my ExtJS production build. I am using a custom theme. I know I can go to MyApp/packages/myCustomTheme/sass/etc/ and use an @import in the all.scss file. But that uses the @import in the production file. I'm hoping there is a way that I can get my existing CSS file compressed with the rest of my app's CSS. 回答1: To include your custom css file in your production build, you can include the stylesheet above the <!-- <x-compile> -->

What is the use of initComponent function in extjs4.1?

痞子三分冷 提交于 2019-12-18 11:30:25
问题 Can anybody tell me what the use of the initComponent function is in extjs4.1? Please provide an example Thanks 回答1: This method is akin to a constructor for components. It is called by the true constructor , and is a really good hook point to customize the initialization of the component (as said in the name!). Except in some very rare occasions, you should override initComponent instead of the constructor because the more basic initialization will already have taken place. Most notably, the

Can you please explain .el, getEl(), Ext.get() in detail?

半世苍凉 提交于 2019-12-18 10:56:10
问题 I am new to Sencha ExtJs I did not understand the line Ext.getCmp('component_id').getEl().hide(); . what is the use of .getEl() . Can i write Ext.getCmp('component_id').hide(); directly? And explain me about .el, Ext.get() also. 回答1: Ext.getCmp() VS Ext.get() Ext.getCmp() finds an existing (created) component in ExtJS component tree. Note that it is discouraged to use it. Rely on ComponentQuery instead. Ext.get() finds a DOM element by id. For example: <html> <body> <div id="target">Hello,

ExtJS 4.2 - Possible causes of a “Sychronous XMLHttpRequest” warning?

不问归期 提交于 2019-12-18 09:25:37
问题 Good day, sorry for the seemingly broad question title. I am building an ExtJS4 application using php and sql for the user data. Everything was going fine until one day, I notice this error in my java console: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/. Initially, I wasn't that troubled since my application was loading fairly well while testing it in my local

Extjs Treepanel: CSS to change default icons (node and leaf)

我怕爱的太早我们不能终老 提交于 2019-12-14 00:19:53
问题 I have a tree panel like http://jsfiddle.net/bmbMy/ I try to change default icons (node and leaf) by using css. But that not working. .x-grid-row .x-grid-tree-node-expanded { background: url('http://icons.iconarchive.com/icons/sekkyumu/developpers/16/Play-Green-Button-icon.png') no-repeat center center !important; } .x-grid-row .x-grid-tree-node-leaf { background-image:url('http://icons.iconarchive.com/icons/graphicrating/koloria/16/Button-Play-Pause-icon.png'); } How can i do that thanks 回答1

ExtJS4.2 Grid Filter Leaves empty Rows with Paging - NewbieQ

女生的网名这么多〃 提交于 2019-12-13 20:06:53
问题 I have tried various ways to refresh the grid but everything I try doesn't work. Do I refresh the Grid or do I load the store??? You can see that the paging tool bar is still showing 50 pages after the filtering. If there are no dates on a given pag and it is empty then it will disable the tool bar and paging doesn't work after that page un less you refresh the browser and skip over the empty page. So, in my case page 15 has no rows so it breaks when u hit next and get that page. If you type

How to set url and root dynamically in extjs

半城伤御伤魂 提交于 2019-12-13 15:21:05
问题 Can anybody tell how to set the url and root of a store dynamically in Ext JS? I have created a store like the one below. I need to update the root and dynamically set the url inside a controller. Ext.define('Test.store.TestStore', { extend: 'Ext.data.Store', model: 'Test.model.TestModel', storeId: 'testStore', proxy: { type: 'jsonp', reader: { type: 'json', root: 'responseXML' } } }); Thanks 回答1: You can set the proxy's url later in your code this way: store.getProxy().url = '/your/url';

Ext JS: Getting a specific row's action column

旧时模样 提交于 2019-12-13 05:38:05
问题 I have a grid that contains an action column for each row. This action column is an edit icon, and when a user clicks the edit icon, I'm kicking off some websocket events, which will eventually trickle down to other users currently connected to the app. What I want to do is grey out this edit icon for the other users. All of that code is working except: I have no idea how I can access the actual row's action column object. I can access it by using the grid's view and grabbing that individual

ExtJS 4.2 Month Days (columns) for Holiday Planner

我的未来我决定 提交于 2019-12-13 04:51:44
问题 I have a requirement for a 4.2.1 ExtJS app that Im building, to have a grid like the image below: The objective of the grid is to manage Holidays for employees. I was thinking in setting the columns of the grid dinamically , but will need to fill the background cell depending of the type of "leave type", and also disable some cells depending on the days that are not supposed to work (like weekends, etc). Any advice on how can I approach to the solution? Appreciate in advance. 回答1: There is a