extjs

ExtJS Store SYNC with Spring Security ON

丶灬走出姿态 提交于 2019-12-23 23:06:18
问题 I am new to Spring Security and I have added it to my project. Everything seems to work perfectly Login/Logout and even navigating across screens. Only when I tried to have an ExtJS grid and added a record in the store and then called the sync() method of the store, I got - Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'. I know that I need to pass _csrf with the request but I would like to know from all of you about the best way to get this done.

ExtJS: Best way to destroy card when hidden, instantiate when shown?

a 夏天 提交于 2019-12-23 22:25:40
问题 I'm using a CardLayout to switch between full-screen panels that have several nodes. To minimize memory usage, I want to destroy a card when it is hidden and only re-create it (from a config object) if/when it is shown. If you look at the 'Switch Cards' button handler below, you'll see how I'm currently accomplishing this. It seems clumsy, however (using ComponentMgr to instantiate the card, adding it to the container, removing the old card, etc.). Is there a better way to accomplish this?

Load extjs using bootstrap.js from outside of extjs app folder

馋奶兔 提交于 2019-12-23 21:23:43
问题 I have built extjs 5 app using sencha cmd and I want to use it in my custom hmtl page. I have the following structure: extjsapp .sencha app build ext packages ...... bootstrap.js bootstrap.json app.js ....... customapp index.html script.js What I want to do is in my customapp/index.html I request bootstrap.js and it should load all packages and ext from extjsapp folder. By default it tries to load them from customapp/ext which is relative to where boostrap.js is used. How can I make/build it

EXT JS 5 - Override ViewController definition?

自古美人都是妖i 提交于 2019-12-23 20:51:21
问题 I want all my ViewControllers to have two custom methods. I tried to accomplish this by creating a class that extends from the ViewController , called CustomViewController , and then having my other ViewControllers extend my CustomViewController class, but then I get a warning message in the console saying: [W] Overriding existing mapping: 'controller.login' From 'MyApp.view.mybutton.MyButtonController' to 'MyApp.view.override.CustomViewController'. Is this intentional? And the component I

How to add an Extra button on Extjs grid header menu

不羁的心 提交于 2019-12-23 20:49:17
问题 has anybody had the need to add an extra button to the grid panel header menu(sorting\columns)? potentially I would like to add another button to the menu that resets to the default columns model. I can accomplish this using Jquery but I was wondering if there is an EXTjs way to do it. Thanks 回答1: You need to dig through the source to see it's there, but a GridPanel has a view property which is its GridView which in turn has a hmenu property which is the menu it shows when you click on one of

Decimal precision in an EXTJS grid

我与影子孤独终老i 提交于 2019-12-23 19:56:43
问题 I have a grid which lets a user enter in a number by editing the row. I want the number to support 4 decimal places, but it only supports 2. I figured out how to display 4 decimal places but it doesn't register anything more than 2 decimal places. So if the user enters 1000.1111 the resulting field will show 1000.1100 in the grid. How can I tell the model that the field is precise to 4 decimal places? My field in the model looks like this: {name: 'Price_Customer__c', type: 'number'}, The

Extjs hasone association

假装没事ソ 提交于 2019-12-23 19:16:18
问题 I have Person model, it contains id, first_name, last_name etc and merital_id field. I also have Merital model contains only 2 field: id and title. Server responses JSON like: { success: true, items: [ { "id":"17", "last_name":"Smith", "first_name":"John", ... "marital_id":1, "marital": { "id":1, "title":"Female" } }, ... ] } So how can I connect my models with association? I still can use record.raw.merital.title in my column.renderer, but I cannot use such fields in templates like {last

Store sync: Many deletions, some failed

两盒软妹~` 提交于 2019-12-23 18:21:02
问题 I have a store in which the user could delete multiple records with a single destroy operation. Now, a few of these records are locked in the database (because someone else is working on them), and thus cannot be deleted. How can the server tell the frontend that the deletion of records with Id a, b, c was successful, but that records with Id x, y, z could not be deleted and should be moved back into the store and displayed in the grid? The ExtJS store should know after the sync() which

Checkbox Column in ExtJS TreeGrid

前提是你 提交于 2019-12-23 18:15:48
问题 is there a way to include a checkbox column in the new extjs widget TreeGrid ? Marking the nodes attribute checked to false/true just doesn't work as it was for the TreePanel. Cheers 回答1: I modified Ext.ux.tree.TreeGridNodeUI class to implement this feature: https://gist.github.com/745436 来源: https://stackoverflow.com/questions/3554304/checkbox-column-in-extjs-treegrid

Ext JS 4: JavaScript Exception “TypeError: Ext.resetElement is undefined” in Ext JS version 4.1.1

荒凉一梦 提交于 2019-12-23 18:13:49
问题 Ext JS 4.1.1 broke my proxies I had set up with ASP.NET. I had to switch back to version 4.1.0 to resolve the issue. Just thought I'd throw this issue out there until it's resolved by Sencha. JavaScript Exception: "TypeError: Ext.resetElement is undefined" ==> "...s.styleProxyEl || (Ext.AbstractComponent.prototype.styleProxyEl" ==> ext-all-debug.js (line 26960) getStyleProxy: function(cls) { var result = this.styleProxyEl || (Ext.AbstractComponent.prototype.styleProxyEl = Ext.resetElement