Clear Up
SharpKit Reference

ElementLoaderConfig Class

Namespace: Ext

Base Types

System.Object

Constructors

Fields

Name Description
ajaxOptions Any additional options to be passed to the request, for example timeout or headers. Defaults to: null
autoLoad True to have the loader make a request as soon as it is created. This argument can also be a set of options that will be passed to load is called. Defaults to: false
baseParams Params that will be attached to every request. These parameters will not be overridden by any params in the load options. Defaults to: null
callback A function to be called when a load request finishes. Will be called with the following config parameters:
  • this - The ElementLoader instance.
  • success - True if successful request.
  • response - The response object.
  • options - Ajax options.
  • failure A function to be called when a load request fails. Will be called with the following config parameters:
  • this - The ElementLoader instance.
  • response - The response object.
  • options - Ajax options.
  • listeners A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once. DOM events from Ext JS Components While some Ext JS Component classes export selected DOM events (e.g. "click", "mouseover" etc), this is usually only done when extra value can be added. For example the DataView's itemclick event passing the node clicked on. To access DOM events directly from a child element of a Component, we need to specify the element option to identify the Component property to add a DOM listener to:
    new Ext.panel.Panel({
                width: 400,
                height: 200,
                dockedItems: [{
                xtype: 'toolbar'
                }],
                listeners: {
                click: {
                element: 'el', //bind to the underlying el property on the panel
                fn: function(){ console.log('click el'); }
                },
                dblclick: {
                element: 'body', //bind to the underlying body property on the panel
                fn: function(){ console.log('dblclick body'); }
                }
                }
                });
                
    loadMask True or a string to show when the element is loading. Defaults to: false
    params Any params to be attached to the Ajax request. These parameters will be overridden by any params in the load options. Defaults to: null
    renderer A custom function to render the content to the element. The function should return false if the renderer could not be applied. The passed parameters are:
  • The loader
  • The response
  • The active request
  • scope The scope to execute the success and failure functions in.
    scripts True to parse any inline script tags in the response. Defaults to: false
    success A function to be called when a load request is successful. Will be called with the following config parameters:
  • this - The ElementLoader instance.
  • response - The response object.
  • options - Ajax options.
  • target The target element for the loader. It can be the DOM element, the id or an Ext.Element. Defaults to: null
    url The url to retrieve the content from. Defaults to: null
    © Copyright 2005-2011 SharpKit. All rights reserved.