extjs

How to move between panels in Sencha touch

末鹿安然 提交于 2021-02-20 04:20:27
问题 When moving between panels I get the following error [WARN][Ext.Component#constructor] Registering a component with a id (`logOutButton`) which has already been used. Please ensure the existing component has been destroyed (`Ext.Component#destroy()`. I can go back to the previous screen but the cannot go forward again without getting the above error. To combat this I have tried using the code below, but it does not work. Can anyone help me out? var loginView = Ext.getCmp('login'); if(

How to use ext-gen ID generated by EXTJS in Selenium?

假如想象 提交于 2021-02-19 04:02:26
问题 While test automating a web application, I get dynamically generated ext-gen IDs. I tried using xpath but the test cases are failing. I went through different websites but did not find any luck. Can somebody help me? Thank you, Srinivas Marthi 回答1: For automated testing, the auto-generated ID-s of ExtJS are best avoided altogether. You can assign your own static ID-s to components, but now you are basically littering your code with global variables, not good either. Using some ID-s might be a

extjs file uploads through form submit for cross domain

别来无恙 提交于 2021-02-15 07:28:52
问题 I would like to upload files to cross domain server from extjs using form.submit() method. When i call form.submit() , request is going to my restful web service and file is getting uploaded successfully. But the response is blocked at the browser with message: Blocked a frame with origi…host:1841" from accessing a cross-origin frame. From older posts and form submit code, i found that doSubmit() is sending the Ajax request with out cors:true statement due to which cross domain response is

How to make an ExtJs window draggable by body?

徘徊边缘 提交于 2021-02-11 15:19:38
问题 We have a requirement in which we need to hide the header of the window and for this we are using header:false But if we use header:false, then window can not be dragged at all. Thus, is there anyway by which a window can be made draggable by body? That is, if header is set to false and is not getting displayed then also somehow user can drag the window. Any suggestions anyone. Thanks for the help. PS: ExtJS Version 4.1 回答1: You could create your own window class that changes how the dragging

Events order between DOM event and sencha event

一曲冷凌霜 提交于 2021-02-11 14:35:43
问题 I've a dataview, written with extjs 7.1 modern tookit, with a template with an anchor tag and a select event: https://fiddle.sencha.com/#view/editor&fiddle/34bd Ext.create({ renderTo: document.body, xtype: 'list', itemTpl: '<div class="contact"><a onclick="event.preventDefault();console.log(\'link\');" href="{firstName}">{firstName}</a> <b>{lastName}</b></div>', store: { data: [{ firstName: 'Peter', lastName: 'Venkman' }, { firstName: 'Raymond', lastName: 'Stantz' }, { firstName: 'Egon',

ExtJS Drag and Drop in tree on modern toolkit

做~自己de王妃 提交于 2021-02-11 08:07:21
问题 Actually I'm going to implement a tree view, where the user should have the option to reorder the structure with drag and drop. Actually I can't figure out how to enable drag and drop. I found a lot of examples using the 'treeviewdragdrop' plugin, which is just working with the classic toolkit. The following Code made me move the first node but not more. this.toParentSource = new Ext.drag.Source({ element: this.getView().element.down('.x-gridcell'), constrain: { element: this.getView().body,

ExtJS Drag and Drop in tree on modern toolkit

自古美人都是妖i 提交于 2021-02-11 08:06:59
问题 Actually I'm going to implement a tree view, where the user should have the option to reorder the structure with drag and drop. Actually I can't figure out how to enable drag and drop. I found a lot of examples using the 'treeviewdragdrop' plugin, which is just working with the classic toolkit. The following Code made me move the first node but not more. this.toParentSource = new Ext.drag.Source({ element: this.getView().element.down('.x-gridcell'), constrain: { element: this.getView().body,

How to wrap submit data of form in extjs 4.2?

人走茶凉 提交于 2021-02-10 20:49:56
问题 I have now by submit: method: save name: Michael birthday: 1983-02-01 but I need: method: save data[name]: Michael data[birthday]: 1983-02-01 and field name must be like birthday not data[birthday] . 回答1: Assuming that you're handling a form submission where you have a control representing the form: var formData = form.getFieldValues(); From Ext.form.Basic.getFieldValues And then submitting via ajax: Ext.Ajax.request({url: "postlocation.php", method: "POST", data: formData}); From Ext.Ajax

ExtJS 6 access messageProperty in store sync's callback

那年仲夏 提交于 2021-02-09 07:18:04
问题 I want to display a message from my server in the UI after synchronizing an ExtJS grid. Here's an excerpt of how that goes: this.store.sync({ callback: function (records, operation, success) { // messageProperty accessing code }, success: function (batch, options) { // messageProperty accessing code }, failure: function (batch, options) { } }); Here's a piece of the store definition: proxy: { headers: { 'Accept': 'application/json' }, limitParam: undefined, pageParam: undefined, startParam:

ExtJS 6 access messageProperty in store sync's callback

二次信任 提交于 2021-02-09 07:15:12
问题 I want to display a message from my server in the UI after synchronizing an ExtJS grid. Here's an excerpt of how that goes: this.store.sync({ callback: function (records, operation, success) { // messageProperty accessing code }, success: function (batch, options) { // messageProperty accessing code }, failure: function (batch, options) { } }); Here's a piece of the store definition: proxy: { headers: { 'Accept': 'application/json' }, limitParam: undefined, pageParam: undefined, startParam: