### Get Initial Configuration Example Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.chart.series.sprite.Bar.html Demonstrates how to retrieve initial configuration options passed to a class instance. It shows how to get the entire configuration object or a specific configuration value by name. ```javascript Ext.define('MyApp.view.Button', { extend: 'Ext.button.Button', xtype: 'mybutton', scale: 'large', enableToggle: true }); var btn = Ext.create({ xtype: 'mybutton', renderTo: Ext.getBody(), text: 'Test Button' }); // Calling btn.getInitialConfig() would return an object including the config options passed to the create method: // { // xtype: 'mybutton', // renderTo: // The document body itself // text: 'Test Button' // } // Calling btn.getInitialConfig('text') returns 'Test Button'. ``` -------------------------------- ### Get Initial Config Example Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.ElementLoader.html Demonstrates how to retrieve initial configuration options passed to a class instance. It shows how to get the entire config object or a specific property value. ```javascript Ext.define('MyApp.view.Button', { extend: 'Ext.button.Button', xtype: 'mybutton', scale: 'large', enableToggle: true }); var btn = Ext.create({ xtype: 'mybutton', renderTo: Ext.getBody(), text: 'Test Button' }); // Calling btn.getInitialConfig() would return an object including the config options passed to the create method: // xtype: 'mybutton', // renderTo: // The document body itself // text: 'Test Button' // Calling btn.getInitialConfig('text') returns 'Test Button'. ``` -------------------------------- ### Example: Get All Initial Configuration Options Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.AnimationQueue.html Demonstrates retrieving all initial configuration options passed to the create method for an Ext.button.Button instance. ```javascript btn.getInitialConfig() ``` -------------------------------- ### Get Initial Configuration Example Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.d3.axis.Axis.html Demonstrates how to retrieve initial configuration options passed to a class instance. This is useful for inspecting the original settings before any modifications. ```javascript Ext.define('MyApp.view.Button', { extend: 'Ext.button.Button', xtype: 'mybutton', scale: 'large', enableToggle: true }); var btn = Ext.create({ xtype: 'mybutton', renderTo: Ext.getBody(), text: 'Test Button' }); // Get all initial configs console.log(btn.getInitialConfig()); // Get a specific initial config console.log(btn.getInitialConfig('text')); ``` -------------------------------- ### Setup Scene and Get Scale Labels Source: https://docs.sencha.com/extjs/7.9.0/classic/src/TreeMap.js.html Calls the parent setupScene method and then retrieves the scaleLabels configuration. This is primarily to trigger any side effects associated with getting that configuration. ```javascript setupScene: function(scene) { this.callParent([scene]); this.getScaleLabels(); // interested in side effects } ``` -------------------------------- ### Example: Get Initial Config for a Specific Property Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.AnimationQueue.html Demonstrates retrieving the initial configuration value for a specific property ('text') from an Ext.button.Button instance. ```javascript btn.getInitialConfig('text') ``` -------------------------------- ### Get Start Param Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.data.proxy.Direct.html Returns the configured name for the start parameter. ```javascript getStartParam() ``` -------------------------------- ### getQuickStart Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.ux.desktop.TaskBar.html Returns the configuration object for the Quick Start toolbar. Derived classes can override this method to modify the configuration. ```APIDOC ## getQuickStart ### Description This method returns the configuration object for the Quick Start toolbar. A derived class can override this method, call the base version to build the config and then modify the returned object before returning it. ### Method (Implicitly public, typically called by framework or derived classes) ### Returns :Object - The configuration object for the Quick Start toolbar. ``` -------------------------------- ### GET /users with start and limit Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Ajax.js-1.html Demonstrates configuring the AjaxProxy to use 'start' and 'limit' parameters for read requests. ```APIDOC ## GET /users with start and limit ### Description This example shows how to configure the AjaxProxy to send 'start' and 'limit' parameters for read operations, which is an alternative to using page parameters. ### Method GET ### Endpoint /users ### Query Parameters - **start** (Number) - Required - The starting index of the records to retrieve. - **limit** (Number) - Required - The maximum number of records to retrieve. ### Request Example ```javascript var proxy = new Ext.data.proxy.Ajax({ url: '/users' }); var operation = proxy.createOperation('read', { start: 50, limit: 25 }); proxy.read(operation); // GET /users?start=50&limit=25 ``` ### Response #### Success Response (200) - **data** (Array) - The array of records returned. - **total** (Number) - The total number of records available. #### Response Example ```json { "data": [ {"id": 51, "name": "User 51"}, {"id": 52, "name": "User 52"} ], "total": 100 } ``` ``` -------------------------------- ### GET /users with custom start and limit parameters Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Ajax.js-1.html Demonstrates configuring the AjaxProxy with custom parameter names for start and limit. ```APIDOC ## GET /users with custom start and limit parameters ### Description This example shows how to customize the parameter names for start and limit when using the AjaxProxy. ### Method GET ### Endpoint /users ### Query Parameters - **startIndex** (Number) - Required - The starting index of the records to retrieve. - **limitIndex** (Number) - Required - The maximum number of records to retrieve. ### Request Example ```javascript var proxy = new Ext.data.proxy.Ajax({ url: '/users', startParam: 'startIndex', limitParam: 'limitIndex' }); var operation = proxy.createOperation('read', { start: 50, limit: 25 }); proxy.read(operation); // GET /users?startIndex=50&limitIndex=25 ``` ### Response #### Success Response (200) - **data** (Array) - The array of records returned. - **total** (Number) - The total number of records available. #### Response Example ```json { "data": [ {"id": 51, "name": "User 51"}, {"id": 52, "name": "User 52"} ], "total": 100 } ``` ``` -------------------------------- ### init Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.tip.QuickTipManager.html Initializes the global QuickTips instance and prepares any quick tips. It can optionally render the QuickTips container immediately and accept a configuration object for the created QuickTip. ```APIDOC ## init ( [autoRender], [config] ) ### Description Initializes the global QuickTips instance and prepare any quick tips. Optionally renders the QuickTips container immediately and accepts a configuration object for the created QuickTip. ### Parameters * **autoRender** (Boolean) - Optional - True to render the QuickTips container immediately to preload images. Defaults to: true * **config** (Object) - Optional - Configuration object for the created QuickTip. Can specify an `xtype` or `className` property, or other configuration properties for the component. ### Returns * Boolean - Indicates if initialization was successful. ``` -------------------------------- ### Get Selection Range - Ext JS Spreadsheet Model Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Rows.js.html Returns the current selection range as an array of [start, end] row indices. Handles cases where start is null or start > end. ```javascript getRange: function() { var start = this.rangeStart, end = this.rangeEnd; if (start == null) { return [0, -1]; } else if (start <= end) { return [start, end]; } return [end, start]; } ``` -------------------------------- ### Get Quick Start Toolbar Configuration Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.ux.desktop.TaskBar.html Retrieves the configuration object for the Quick Start toolbar. Derived classes can override this to modify the configuration. ```javascript getQuickStart: function() { return this.quickStart; } ``` -------------------------------- ### Ext.application Example Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Player.js.html Example of bootstrapping an Ext JS application. This sets up the application's namespace and launches it. ```javascript Ext.application({ name: 'MyApp', launch: function() { Ext.create('MyApp.view.MyPanel', { renderTo: Ext.getBody() }); } }); ``` -------------------------------- ### base Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.sparkline.Bullet.html Sets or gets the base start number for the sparkline. When set to a number, it changes the starting point of the sparkline's scale. Defaults to null. ```APIDOC ## base : Number ### Description Set this to a number to change the base start number. ### Defaults ``` null ``` ``` -------------------------------- ### Get Curve Example Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.chart.series.Line.html Retrieves the current curve configuration for the line series. ```javascript getCurve() ``` -------------------------------- ### Instantiate and Log Ext.Version Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.Version.html Demonstrates how to create a new Ext.Version instance with a version string and log its string representation. ```javascript var version = new Ext.Version('1.0.2beta'); // or maybe "1.0" or "1.2.3.4RC" console.log("Version is " + version); // Version is 1.0.2beta ``` -------------------------------- ### Initialize and Configure QuickTips Singleton Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.tip.QuickTipManager.html Initializes the QuickTips singleton and applies global configuration settings such as maxWidth, minWidth, and showDelay. This ensures all subsequent tooltips adhere to these global settings. ```javascript // Init the singleton. Any tag-based quick tips will start working. Ext.tip.QuickTipManager.init(); // Apply a set of config properties to the singleton Ext.apply(Ext.tip.QuickTipManager.getQuickTip(), { maxWidth: 200, minWidth: 100, showDelay: 50 // Show 50ms after entering target }); ``` -------------------------------- ### setup Method Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.calendar.dd.DaysAllDaySource.html Placeholder for setup logic executed when the info object is created. Defaults to a private function. ```javascript Ext.privateFn ``` -------------------------------- ### Cache Initialization Example Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Cache.js.html Demonstrates how to initialize an Ext.util.Cache instance with custom miss and evict functions. ```APIDOC ## Cache Initialization ### Description Initialize a cache with specific logic for handling cache misses and item eviction. ### Example Usage ```javascript this.itemCache = new Ext.util.Cache({ maxSize: 100, miss: function (key) { // Logic to create a new cache item return new CacheItem(key); }, evict: function (key, cacheItem) { // Logic to clean up when an item is evicted cacheItem.destroy(); } }); // Retrieving an item from the cache var item = this.itemCache.get(someKey); ``` ### Parameters for Constructor - **config** (Object) - Configuration object for the cache. - **miss** (Function) - Function to call when a cache miss occurs. Accepts the key and any additional arguments passed to `get`. - **evict** (Function) - Function to call when an item is evicted from the cache. Accepts the key and the cache item's value. ``` -------------------------------- ### getProxy Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.panel.Proxy.html Gets the proxy element. This is the element that represents where the Panel was before the drag operation started. ```APIDOC ## getProxy ### Description Gets the proxy element. This is the element that represents where the Panel was before we started the drag operation. ### Returns :Ext.dom.Element - The proxy's element. ``` -------------------------------- ### Get Calendar Move Base Value Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Month.js-1.html Retrieves the starting date of the month in local time, used as a base for navigation. This is essential for determining the starting point when moving between calendar months. ```javascript return this.utcToLocal(this.dateInfo.month.start); ``` -------------------------------- ### Start a Simple Clock Task with Ext.util.TaskRunner Source: https://docs.sencha.com/extjs/7.9.0/classic/src/TaskRunner.js.html This example demonstrates how to start a simple clock task using Ext.util.TaskRunner that updates a div element every second. It requires an instance of TaskRunner. ```javascript var runner = new Ext.util.TaskRunner(), clock, updateClock, task; clock = Ext.getBody().appendChild({ id: 'clock' }); // Start a simple clock task that updates a div once per second updateClock = function() { clock.setHtml(Ext.Date.format(new Date(), 'g:i:s A')); }; task = runner.start({ run: updateClock, interval: 1000 }); ``` -------------------------------- ### Controller Configuration Examples Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.d3.HeatMap.html Demonstrates how to configure a controller for a component using a string alias, a configuration object, or an instance. ```javascript Ext.define('MyApp.UserController', { alias: 'controller.user' }); Ext.define('UserContainer', { extend: 'Ext.container.container', controller: 'user' }); ``` ```javascript // Or Ext.define('UserContainer', { extend: 'Ext.container.container', controller: { type: 'user', someConfig: true } }); ``` ```javascript // Can also instance at runtime var ctrl = new MyApp.UserController(); var view = new UserContainer({ controller: ctrl }); ``` -------------------------------- ### Initializing and Configuring QuickTips Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.tip.QuickTipManager.html This snippet shows how to initialize the QuickTipManager, apply global configuration settings to its instance, and register a quick tip programmatically for a specific element. ```APIDOC ## Initialize and Configure QuickTips ### Description Initializes the QuickTipManager singleton and applies global configuration settings. It also demonstrates how to manually register a quick tip with specific properties for a target element. ### Methods - `Ext.tip.QuickTipManager.init()`: Initializes the singleton. - `Ext.apply(Ext.tip.QuickTipManager.getQuickTip(), config)`: Applies configuration properties to the singleton's QuickTip instance. - `Ext.tip.QuickTipManager.register(config)`: Registers a quick tip for a specific element. ### Configuration Properties (Singleton) - `maxWidth` (number): Maximum width of the tooltip. - `minWidth` (number): Minimum width of the tooltip. - `showDelay` (number): Delay in milliseconds before showing the tooltip. ### Configuration Properties (Target Element) - `target` (string/HTMLElement): The element to associate the tooltip with. - `title` (string): The title of the tooltip. - `text` (string): The main text content of the tooltip. - `width` (number): The width of the tooltip. - `dismissDelay` (number): Delay in milliseconds before the tooltip is hidden after hovering. ### Request Example ```javascript // Init the singleton. Any tag-based quick tips will start working. Ext.tip.QuickTipManager.init(); // Apply a set of config properties to the singleton Ext.apply(Ext.tip.QuickTipManager.getQuickTip(), { maxWidth: 200, minWidth: 100, showDelay: 50 // Show 50ms after entering target }); // Create a small panel to add a quick tip to Ext.create('Ext.container.Container', { id: 'quickTipContainer', width: 200, height: 150, style: { backgroundColor:'#000000' }, renderTo: Ext.getBody() }); // Manually register a quick tip for a specific element Ext.tip.QuickTipManager.register({ target: 'quickTipContainer', title: 'My Tooltip', text: 'This tooltip was added in code', width: 100, dismissDelay: 10000 // Hide after 10 seconds hover }); ``` ``` -------------------------------- ### Create and Show a Basic Window Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Window.js.html This example demonstrates how to create and display a simple Ext.window.Window with a title, dimensions, and a 'fit' layout containing a grid. It's useful for creating modal dialogs or application windows. ```javascript Ext.create('Ext.window.Window', { title: 'Hello', height: 200, width: 400, layout: 'fit', items: { // Let's put an empty grid in just to illustrate fit layout xtype: 'grid', border: false, // One header just for show. There's no data columns: [{ header: 'World' }], store: Ext.create('Ext.data.ArrayStore', {}) // A dummy empty data store } }).show(); ``` -------------------------------- ### Pivot Grid Matrix Configuration Example Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Grid.js-1.html Example of configuring the pivot matrix for a pivot grid, defining data sources, axes, and aggregations. This setup is used to define how data is pivoted and displayed. ```javascript { xtype: 'pivotgrid', matrix: { type: 'local', store: 'yourStoreId' // or a store instance rowGrandTotalsPosition: 'first', leftAxis: [{ dataIndex: 'country', direction: 'DESC', header: 'Countries' width: 150 }], topAxis: [{ dataIndex: 'year', direction: 'ASC' }], aggregate: [{ dataIndex: 'value', header: 'Total', aggregator: 'sum', width: 120 }] } } ``` -------------------------------- ### Get Selection Start Record Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Model.js.html Retrieves the record that was initially selected, used for range selection logic. ```javascript getSelectionStart: function() { return this.selectionStart; } ``` -------------------------------- ### Object Configuration Example Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.calendar.view.Day.html Shows how to configure object-based options. This is useful for setting multiple related configurations at once. ```javascript compactOptions : Object Defaults to: null ``` -------------------------------- ### Basic Summary Grid Example Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.grid.feature.Summary.html Demonstrates how to create a grid with a summary feature. This example sets up a data model, a grid panel with the 'summary' feature enabled, and populates it with sample data. ```javascript Ext.define('TestResult', { extend: 'Ext.data.Model', fields: ['student', { name: 'mark', type: 'int' }] }); Ext.create('Ext.grid.Panel', { width: 400, height: 200, title: 'Summary Test', style: 'padding: 20px', renderTo: document.body, features: [{ ftype: 'summary' }], store: { model: 'TestResult', data: [{ student: 'Student 1', mark: 84 },{ student: 'Student 2', mark: 72 },{ student: 'Student 3', mark: 96 },{ student: 'Student 4', mark: 68 }] } }); ``` -------------------------------- ### Get Event Y Coordinate Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.event.Event.html Retrieves the y-coordinate of the event. No specific setup is required beyond having an event object. ```javascript event.getY() ``` -------------------------------- ### Month Panel Configuration Example Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.calendar.panel.Month.html Example of configuring the initial date and first day of the week for the Month panel. The `value` config sets the target month, and `firstDayOfWeek` determines the starting day of the week display. ```javascript { value: new Date(2010, 0, 1) // Fri firstDayOfWeek: 0 // Sunday } ``` -------------------------------- ### Example: Dynamic Button Text Initialization Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Component.js.html Demonstrates how to set dynamic configuration values, like button text, during the `initComponent` phase. This example also shows setting `renderTo` and calling `callParent`. ```javascript Ext.define('DynamicButtonText', { extend: 'Ext.button.Button', initComponent: function() { this.text = new Date(); this.renderTo = Ext.getBody(); this.callParent(); } }); Ext.onReady(function() { Ext.create('DynamicButtonText'); }); ``` -------------------------------- ### enable Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.tip.QuickTipManager.html Enables quick tips globally. ```APIDOC ## enable ### Description Enables quick tips globally. ### Method (Implicitly called, likely part of an object's lifecycle) ### Endpoint N/A (Method of an object instance) ### Parameters None. ``` -------------------------------- ### Get Current Operation Source: https://docs.sencha.com/extjs/7.9.0/classic/src/Batch.js.html Returns the operation currently being processed. Returns null if the batch has not started or has already completed. ```javascript getCurrent: function() { var out = null, current = this.current; if (!(current === -1 || this.complete)) { out = this.operations[current]; } return out; } ``` -------------------------------- ### Get Range of Nodes Source: https://docs.sencha.com/extjs/7.9.0/classic/src/AbstractView.js.html Retrieves a range of nodes from the 'all' collection. Accepts optional start and end indices. ```javascript getNodes: function(start, end) { var all = this.all; if (end !== undefined) { end++; } return all.slice(start, end); } ``` -------------------------------- ### Initializing QuickTips Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.data.NodeInterface.html This code initializes the Ext.tip.QuickTipManager, which is necessary for displaying tooltips on tree nodes that have `qtitle` and `qtip` configurations. It should be called unless Ext.application() is used, which initializes it automatically. ```javascript Ext.tip.QuickTipManager.init(); ``` -------------------------------- ### Initial Config Object Example Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.data.schema.OneToOne.html Shows the expected output of getInitialConfig() when called on the example button instance. ```javascript { xtype: 'mybutton', renderTo: // The document body itself, text: 'Test Button' } ``` -------------------------------- ### Get Record Range Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.data.AbstractStore.html Gathers a range of records between specified start and end indices. This method is affected by filtering. ```javascript store.getRange(start, end); ``` -------------------------------- ### Basic Window Configuration Source: https://docs.sencha.com/extjs/7.9.0/classic/Ext.window.Window.html Demonstrates the fundamental configuration options for creating a basic Ext.window.Window instance. This includes setting title, width, height, and layout. ```javascript Ext.create('Ext.window.Window', { title: 'Hello', height: 200, width: 400, layout: 'fit', items: [{ border: false, html: '