extjs4.2

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

删除回忆录丶 提交于 2019-12-02 17:40:41
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.responseText); list.forEach(function(item){ storeMenu.add( Ext.create('Ext.menu.Item', { text: item.text,

ExtJS 4.2 DatePicker Multiselect catch event in controller

一个人想着一个人 提交于 2019-12-02 01:08:53
I am creating a custom date-picker in ExtJS 4.2 using the MVC architecture. The idea is that the component allows a user to input / select multiple dates at a time however I am having a few issues: My selectedDates variable is an object and I don't how how to make it return the list of dates. When you open a new window the picker remembers the previously selected dates from the last time that the window was open. I thought that when you close a window in Ext , the components are destroyed ? There is a little too much code to paste into my post but I've created a fiddle here . I placed a button

Ext.isIE return false in IE 11

倖福魔咒の 提交于 2019-12-01 17:02:16
When I try to use Ext.isIE in IE11 i get false the returning value. And then during the debug my code I see that I get the following error: JavaScript Error - Msg:Invalid argument., my extjs's version is: 4,2 matt IE 11 is not officially supported prior to ExtJS 4.2.2 (see property isIE11 ). Microsoft removed the MSIE part from IE11's user agent (refer here ), which is the reason why it does not work with ExtJS 4.2.1 and below. From the source code, for ExtJS 4.2.1 : isIE = !isOpera && check(/msie/), isIE7 = isIE && ((check(/msie 7/) && docMode != 8 && docMode != 9 && docMode != 10) || docMode

ExtJS grid: handling action column's click event in the controller

落花浮王杯 提交于 2019-12-01 06:40:27
问题 I have a view 'EmployeeList'. Inside it there is a grid. I need to handle the actioncolumn's click event from controller. Here is the view: Ext.define('ExtApp.view.Employees', { extend: 'Ext.panel.Panel', alias: 'widget.employees', . . . . . }); This view contains a grid: xtype: 'grid', columns:[{ . . . . xtype: 'actioncolumn', text: 'Delete', width: 100, items: [{ icon: 'images/deleteEmployee.jpg', tooltip: 'Delete' }] }] How do I handle the actioncolumn's click event in my controller? Here

Extjs fileuplaod - cross-origin frame

淺唱寂寞╮ 提交于 2019-11-30 15:29:56
问题 I have a fileupload field in my from in Extjs application. Where I am trying to load files to the server by following code: var form = Ext.getCmp('ProcImpNewSugFileForm').getForm(); var fileNameStr = Ext.getCmp('ProcImpNewSugFileUpload').getValue().split("\\"); if(fileNameStr){ var filename = fileNameStr[fileNameStr.length-1]; if(form.isValid()){ form.submit({ url: '/PISRFileUploader.php', waitMsg: 'Uploading your file...', success: function (formPanel, action, result) { Ext.Msg.alert('Msg',

Extjs fileuplaod - cross-origin frame

会有一股神秘感。 提交于 2019-11-30 13:59:51
I have a fileupload field in my from in Extjs application. Where I am trying to load files to the server by following code: var form = Ext.getCmp('ProcImpNewSugFileForm').getForm(); var fileNameStr = Ext.getCmp('ProcImpNewSugFileUpload').getValue().split("\\"); if(fileNameStr){ var filename = fileNameStr[fileNameStr.length-1]; if(form.isValid()){ form.submit({ url: '/PISRFileUploader.php', waitMsg: 'Uploading your file...', success: function (formPanel, action, result) { Ext.Msg.alert('Msg',"Success: "+action.response.responseText); }, failure: function (formPanel, action, result) { Ext.Msg

Extjs 4.2: How to send parameters properly in a Ext.Ajax.Request POST

十年热恋 提交于 2019-11-30 07:00:53
I have to do a POST from my ExtJs script in order to delete something from my DB: Ext.Ajax.request({ url: 'deleteRole.html', method: 'POST', headers: {'Content-Type': 'text/html'}, waitTitle: 'Connecting', waitMsg: 'Sending data...', params: { "rolename" : rolename }, scope:this, success: received, failure: function(){console.log('failure');} }); when the post is sent i can see in the firebug the rolename in font but not as a param. I would like to show you another post (made with spring:form) relative to the user registration. If i inspect the post i can see the following: (source:

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

谁说我不能喝 提交于 2019-11-30 00:46: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. 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, world!</div> </body> </html> Ext.get('target') will return div#target DOM element. I personally never use

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

北城余情 提交于 2019-11-29 16:56:27
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 network. However, once I uploaded to an online server and tested it, the application loaded really slowly

How to get responsecode from store callback?

倾然丶 夕夏残阳落幕 提交于 2019-11-28 04:32:52
问题 I'm trying to handle session timeout server-side. When getting session timeout, my server sends back a response with json {success: false}, ContentType: 'application/json', ResponseNo: 408 store: var storeAssets = Ext.create('Ext.data.Store', { model : 'modCombo', autoLoad : false, proxy : { limitParam : undefined, startParam : undefined, paramName : undefined, pageParam : undefined, noCache : false, type : 'ajax', url : '/caricaAssets.json', reader : { root : 'data' } } }); And on the client