Skip to main content

Posts

Showing posts from January, 2018

How to use Fancy Ext.Logger?

How to customize Ext.Logger effectively? For development, We can customize Ext.Logger mechanism and add colors to text as below /** * Fancy Ext.Logger.warn(), error() * By including this file we'll force override of the Ext.Logger.warn() behavior. eg: Ext.Logger.error(errMsg); Ext.Logger.warn('Warning msg'); */ Ext.define('Master.util.Log', { singleton: true, /** * Logs color-coded console message; intended for development only * to be used in betwee debug directives. * @param {String} text to log */ warn: function(text) { console.log('%cWARN: %s', 'background: #222; color: orange', text); }, error: function(text) { console.log('%cERROR: %s', 'background: #d9e6ee; color: red', text); } }, function() { Ext.Logger.warn = Master.util.Log.warn; Ext.Logger.error = Master.util.Log.error; });

EXTJS4 Override AJAX Timeouts

EXTJS4: Set global default Ajax timeout for sencha application Version Info: Ext JS 4.2x If we want to increase the timeout globally across my application. ExtJS documentation makes it look like setting Ext.Ajax.timeout will increase all timeouts, it’s just not true. This code sets 5 mins for forms, stores and ajax proxies calls within MVC application. Code snippet: Ext.Ajax.timeout= 300000; // 300 seconds (5 mins) Ext.override(Ext.form.Basic, { timeout: Ext.Ajax.timeout / 1000 }); Ext.override(Ext.data.proxy.Server, { timeout: Ext.Ajax.timeout }); Ext.override(Ext.data.Connection, { timeout: Ext.Ajax.timeout }); // If you are using Ext.define in your code. It creates new class and does not override timeout property in base class.Hence use above code snippet. Ext.define('Test.data.Connection', { override: 'Ext.data.Connection', timeout: 120000 });

ExtJS4 - 2016 Fiddles

ExtJS Fiddles (2016) // In exjts 4.1.x and 4.2.0, destroy() will not destroy its children components? Components without store binding  http://jsfiddle.net/mustafa0x/qVM82/1/ windows with stores http://jsfiddle.net/mustafa0x/qVM82/3/ EXT Speech Recognition Wrapper https://fiddle.sencha.com/#fiddle/3lu&view/editor Custom Editor for Property Grid http://jsfiddle.net/existdissolve/wMcQk/ Infinite scroll grid 4.2 https://fiddle.sencha.com/#view/editor&fiddle/e04 Cell editing - load store after layout event http://docs.sencha.com/extjs/4.2.4/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#cell-editing Grid cellediting https://fiddle.sencha.com/#fiddle/100a&view/editor doComponent Layout- style with google fonts https://fiddle.sencha.com/#fiddle/eoj Fieldset - clear fields https://fiddle.sencha.com/#fiddle/1bdg Generating a Checkbox Group from a Store https://druckit.wordpress.com/2015/02/12/ext-js-generating-a-checkbox-group-from-a