extjs

ExtJS, store, HasMany - BelongsTo and update process: howto?

梦想的初衷 提交于 2019-12-18 11:35:03
问题 I have two data models: Writer.AttributValeur and Writer.Produit . Writer.Produit has HasMany / BelongsTo relationship with Writer.AttributValeur . Thus the definition is like this: Ext.define('Writer.AttributValeur', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'int', useNull: true }, 'description', 'val' ], belongsTo: 'Writer.Produit' }); Ext.define('Writer.Produit', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'int', useNull: true }, 'titre', 'description' ],

how to make a full modal window in ext 4?

岁酱吖の 提交于 2019-12-18 11:34:54
问题 Like a window in microsoft OS (xp,vista, 7 etc)... If a main window create a modal window, the user can't access the main window, (including close and access the toolbar etc). I want to make a similar one with extjs. This is my modal example : Ext.create("Ext.Window", { title: 'aa', width: 200, height: 150, html: 'a', tbar: [{ text: 'aa', handler: function() { Ext.create("Ext.Window", { title: 'aa', width: 150, closable: false, height: 100, html: 'b', ownerCt: this, modal: true }).show(); } }

ExtJS, store, HasMany - BelongsTo and update process: howto?

蹲街弑〆低调 提交于 2019-12-18 11:34:15
问题 I have two data models: Writer.AttributValeur and Writer.Produit . Writer.Produit has HasMany / BelongsTo relationship with Writer.AttributValeur . Thus the definition is like this: Ext.define('Writer.AttributValeur', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'int', useNull: true }, 'description', 'val' ], belongsTo: 'Writer.Produit' }); Ext.define('Writer.Produit', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'int', useNull: true }, 'titre', 'description' ],

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,

ExtJs4 how to disable all fields and all buttons on a panel recursively

自闭症网瘾萝莉.ら 提交于 2019-12-18 10:55:51
问题 I'm trying to disable all clickable, editable components on my panel. Calling panel.disable() grays it out, but buttons are still clickable. The same result gives panel.cascade with a function that disables each component. What is the right way to do this? 回答1: If you are using ExtJs 4.x , this is what you are looking for - myFormPanel.query('.field, .button').forEach(function(c){c.setDisabled(false);}); (Modify your selector based on the complexity of your form. You can just use .component

How can I automatically compress and minimize JavaScript files in an ASP.NET MVC app?

喜夏-厌秋 提交于 2019-12-18 09:55:30
问题 So I have an ASP.NET MVC app that references a number of javascript files in various places (in the site master and additional references in several views as well). I'd like to know if there is an automated way for compressing and minimizing such references into a single .js file where possible. Such that this ... <script src="<%= ResolveUrl("~") %>Content/ExtJS/Ext.ux.grid.GridSummary/Ext.ux.grid.GridSummary.js" type="text/javascript"></script> <script src="<%= ResolveUrl("~") %>Content

how data in grouping grid will be shown

这一生的挚爱 提交于 2019-12-18 09:45:33
问题 I am using this article of architecture http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/ Here is my Application.ResellerGrid.js Application.ResellerGrid = Ext.extend(Ext.grid.GridPanel, { border:false ,cityname : '' ,columndataindex : '' ,fromdate:'' ,todate : '' ,initComponent:function() { var config = { store:new Ext.data.GroupingStore({ // store configs autoDestroy: true, autoLoad :false, url: 'api/index.php?_command=getresellers&city='+this.cityname+'&columndataindex='+this

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 4 to ExtJS 5 migration

孤街浪徒 提交于 2019-12-18 09:12:56
问题 We are migrating a web application from ExtJS 4 to ExtJS 5 . Testing the index.html results in the following error (outputted by the Firefox-FireBug-console ): NetworkError: 404 Not Found - http://localhost:8080/ext/build/examples/ux/grid/FiltersFeature.js?_dc=1414147197935 I have already searched for the FilterFeatures.js -file inside the directory, but it isn't there. According to the "Whats New in ExtJS 5.0"-site this file was so popular, that they thought it would be wise to move it. Can