X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..6a7e4474cba9d8be4b2ec445e10f1691f7277c50:/docs/output/Ext.DataView.html diff --git a/docs/output/Ext.DataView.html b/docs/output/Ext.DataView.html index d3ba7e3e..3830cdcc 100644 --- a/docs/output/Ext.DataView.html +++ b/docs/output/Ext.DataView.html @@ -1,4 +1,4 @@ -
Observable
  Component
    BoxComponent
      DataView

Class Ext.DataView

Package:Ext
Defined In:DataView.js
Class:DataView
Subclasses:ListView
Extends:BoxComponent
A mechanism for displaying data using custom layout templates and formatting. DataView uses an Ext.XTemplate +
Observable
  Component
    BoxComponent
      DataView

Class Ext.DataView

Package:Ext
Defined In:DataView.js
Class:DataView
Subclasses:ListView
Extends:BoxComponent
A mechanism for displaying data using custom layout templates and formatting. DataView uses an Ext.XTemplate as its internal templating mechanism, and is bound to an Ext.data.Store so that as the data in the store changes the view is automatically updated to reflect the changes. The view also provides built-in behavior for many common events that can occur for its contained items including click, doubleclick, @@ -160,7 +160,9 @@ child items when the browser changes its width:
var myPanel = <
     }, {
         title: 'Box 3'
     }],
-});
BoxComponent boxMaxHeight : Number
The maximum value in pixels which this BoxComponent will set its height to. +});
BoxComponent blockRefresh : Boolean
Set this to true to ignore datachanged events on the bound store. This is useful if +you wish to provide custom transi...
Set this to true to ignore datachanged events on the bound store. This is useful if +you wish to provide custom transition animations via a plugin (defaults to false)
DataView boxMaxHeight : Number
The maximum value in pixels which this BoxComponent will set its height to. Warning: This will override any size mana...

The maximum value in pixels which this BoxComponent will set its height to.

Warning: This will override any size management applied by layout managers.

BoxComponent boxMaxWidth : Number
The maximum value in pixels which this BoxComponent will set its width to. Warning: This will override any size manag...

The maximum value in pixels which this BoxComponent will set its width to.

@@ -168,7 +170,10 @@ Warning: This will override any size manag...

The maxi Warning: This will override any size mana...

The minimum value in pixels which this BoxComponent will set its height to.

Warning: This will override any size management applied by layout managers.

BoxComponent boxMinWidth : Number
The minimum value in pixels which this BoxComponent will set its width to. Warning: This will override any size manag...

The minimum value in pixels which this BoxComponent will set its width to.

-

Warning: This will override any size management applied by layout managers.

BoxComponent clearCls : String
The CSS class used to to apply to the special clearing div rendered +

Warning: This will override any size management applied by layout managers.

BoxComponent bubbleEvents : Array
An array of events that, when fired, should be bubbled to any parent container. +See Ext.util.Observable.enableBubble....

An array of events that, when fired, should be bubbled to any parent container. +See Ext.util.Observable.enableBubble. +Defaults to [].

Component clearCls : String
The CSS class used to to apply to the special clearing div rendered directly after each form field wrapper to provide...

The CSS class used to to apply to the special clearing div rendered directly after each form field wrapper to provide field clearing (defaults to 'x-form-clear-left').

@@ -703,9 +708,9 @@ DataView's XTemplate which uses '<tpl for=".">' to iterate over its supplied data object as an Array. However, named properties may be placed into the data object to provide non-repeating data such as headings, totals etc.

Parameters:
  • records : Array
    An Array of Ext.data.Records to be rendered into the DataView.
  • startIndex : Number
    the index number of the Record being prepared for rendering.
Returns:
  • Array
    An Array of data objects to be processed by a repeating XTemplate. May also -contain <i>named</i> properties.
DataView deselectHTMLElement/Number node ) +contain <i>named</i> properties.
DataView deselectHTMLElement/Number/Record node ) : - void
Deselects a node.
Deselects a node.
Parameters:
  • node : HTMLElement/Number
    The node to deselect
Returns:
  • void
DataView destroy() + void
Deselects a node.
Deselects a node.
Parameters:
  • node : HTMLElement/Number/Record
    The node, node index or record to deselect
Returns:
  • void
DataView destroy() : void
Destroys this component by purging any event listeners, removing the component's element from the DOM, removing the c...
Destroys this component by purging any event listeners, removing the component's element from the DOM, @@ -717,38 +722,38 @@ should usually not need to be called directly.
Enable this component and fire the 'enable' event.
Enable this component and fire the 'enable' event.
Parameters:
  • None.
Returns:
  • Ext.Component
    this
Component enableBubbleString/Array events ) : - void
Enables events fired by this Observable to bubble up an owner hierarchy by calling -this.getBubbleTarget() if present...

Enables events fired by this Observable to bubble up an owner hierarchy by calling -this.getBubbleTarget() if present. There is no implementation in the Observable base class.

-

This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default -implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to -access the required target more quickly.

-

Example:

Ext.override(Ext.form.Field, {
-    //  Add functionality to Field's initComponent to enable the change event to bubble

-    initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
-        this.enableBubble('change');
-    }),
-
-    //  We know that we want Field's events to bubble directly to the FormPanel.

-    getBubbleTarget : function() {
-        if (!this.formPanel) {
-            this.formPanel = this.findParentByType('form');
-        }
-        return this.formPanel;
-    }
-});
-
-var myForm = new Ext.formPanel({
-    title: 'User Details',
-    items: [{
-        ...
-    }],
-    listeners: {
-        change: function() {
-            // Title goes red if form has been modified.

-            myForm.header.setStyle('color', 'red');
-        }
-    }
+                                        void
Enables events fired by this Observable to bubble up an owner hierarchy by calling +this.getBubbleTarget() if present....

Enables events fired by this Observable to bubble up an owner hierarchy by calling +this.getBubbleTarget() if present. There is no implementation in the Observable base class.

+

This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default +implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to +access the required target more quickly.

+

Example:

Ext.override(Ext.form.Field, {
+    //  Add functionality to Field's initComponent to enable the change event to bubble
+    initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+        this.enableBubble('change');
+    }),
+
+    //  We know that we want Field's events to bubble directly to the FormPanel.
+    getBubbleTarget : function() {
+        if (!this.formPanel) {
+            this.formPanel = this.findParentByType('form');
+        }
+        return this.formPanel;
+    }
+});
+
+var myForm = new Ext.formPanel({
+    title: 'User Details',
+    items: [{
+        ...
+    }],
+    listeners: {
+        change: function() {
+            // Title goes red if form has been modified.
+            myForm.header.setStyle('color', 'red');
+        }
+    }
 });
Parameters:
  • events : String/Array
    The event name to bubble, or an Array of event names.
Returns:
  • void
Observable findItemFromChildHTMLElement node ) : HTMLElement
Returns the template node the passed child belongs to, or null if it doesn't belong to one.
Returns the template node the passed child belongs to, or null if it doesn't belong to one.
Parameters:
  • node : HTMLElement
Returns:
  • HTMLElement
    The template node
DataView findParentByFunction fn ) @@ -798,9 +803,10 @@ returns an id if an id is not defined yet:
<
 itemId was not assigned through configuration the
 id is returned using g...
Returns the itemId of this component. If an itemId was not assigned through configuration the -id is returned using getId.
Parameters:
  • None.
Returns:
  • String
Component getNodeHTMLElement/String/Number nodeInfo ) +id is returned using getId.
Parameters:
  • None.
Returns:
  • String
Component getNodeHTMLElement/String/Number/Ext.data.Record nodeInfo ) : - HTMLElement
Gets a template node.
Gets a template node.
Parameters:
  • nodeInfo : HTMLElement/String/Number
    An HTMLElement template node, index of a template node or the id of a template node
Returns:
  • HTMLElement
    The node or null if it wasn't found
DataView getNodes[Number start][Number end] ) + HTMLElement
Gets a template node.
Gets a template node.
Parameters:
  • nodeInfo : HTMLElement/String/Number/Ext.data.Record
    An HTMLElement template node, index of a template node, +the id of a template node or the record associated with the node.
Returns:
  • HTMLElement
    The node or null if it wasn't found
DataView getNodes[Number start][Number end] ) : Array
Gets a range nodes.
Gets a range nodes.
Parameters:
  • start : Number
    (optional) The index of the first node in the range
  • end : Number
    (optional) The index of the last node in the range
Returns:
  • Array
    An array of nodes
DataView getOuterSize() : @@ -857,11 +863,12 @@ alert(t.getXTypes()); // alerts 'component/box/field/textfield' false to cancel hiding the component. Fires the 'h...
Hide this component. Listen to the 'beforehide' event and return false to cancel hiding the component. Fires the 'hide' event after hiding the component. Note this method is called internally if -the component is configured to be hidden.
Parameters:
  • None.
Returns:
  • Ext.Component
    this
Component indexOfHTMLElement/String/Number nodeInfo ) +the component is configured to be hidden.
Parameters:
  • None.
Returns:
  • Ext.Component
    this
Component indexOfHTMLElement/String/Number/Record nodeInfo ) : - Number
Finds the index of the passed node.
Finds the index of the passed node.
Parameters:
  • nodeInfo : HTMLElement/String/Number
    An HTMLElement template node, index of a template node or the id of a template node
Returns:
  • Number
    The index of the node or -1
DataView isSelectedHTMLElement/Number node ) + Number
Finds the index of the passed node.
Finds the index of the passed node.
Parameters:
  • nodeInfo : HTMLElement/String/Number/Record
    An HTMLElement template node, index of a template node, the id of a template node +or a record associated with a node.
Returns:
  • Number
    The index of the node or -1
DataView isSelectedHTMLElement/Number/Ext.data.Record node ) : - Boolean
Returns true if the passed node is selected, else false.
Returns true if the passed node is selected, else false.
Parameters:
  • node : HTMLElement/Number
    The node or node index to check
Returns:
  • Boolean
    True if selected, else false
DataView isVisible() + Boolean
Returns true if the passed node is selected, else false.
Returns true if the passed node is selected, else false.
Parameters:
  • node : HTMLElement/Number/Ext.data.Record
    The node, node index or record to check
Returns:
  • Boolean
    True if selected, else false
DataView isVisible() : Boolean
Returns true if this component is visible.
Returns true if this component is visible.
Parameters:
  • None.
Returns:
  • Boolean
    True if this component is visible, false otherwise.
Component isXTypeString xtype[Boolean shallow] ) : @@ -949,19 +956,19 @@ which this component will be inserted (defaults to appending to the end of the c If events were suspended using the queueSuspended parameter, then all event...
Resume firing events. (see suspendEvents) If events were suspended using the queueSuspended parameter, then all -events fired during event suspension will be sent to any listeners now.
Parameters:
  • None.
Returns:
  • void
Observable selectArray/HTMLElement/String/Number nodeInfo[Boolean keepExisting][Boolean suppressEvent] ) +events fired during event suspension will be sent to any listeners now.
Parameters:
  • None.
Returns:
  • void
Observable selectArray/HTMLElement/String/Number/Ext.data.Record nodeInfo[Boolean keepExisting][Boolean suppressEvent] ) : - void
Selects a set of nodes.
Selects a set of nodes.
Parameters:
  • nodeInfo : Array/HTMLElement/String/Number
    An HTMLElement template node, index of a template node, -id of a template node or an array of any of those to select
  • keepExisting : Boolean
    (optional) true to keep existing selections
  • suppressEvent : Boolean
    (optional) true to skip firing of the selectionchange vent
Returns:
  • void
DataView selectRangeNumber startNumber end[Boolean keepExisting] ) + void
Selects a set of nodes.
Selects a set of nodes.
Parameters:
  • nodeInfo : Array/HTMLElement/String/Number/Ext.data.Record
    An HTMLElement template node, index of a template node, +id of a template node, record associated with a node or an array of any of those to select
  • keepExisting : Boolean
    (optional) true to keep existing selections
  • suppressEvent : Boolean
    (optional) true to skip firing of the selectionchange vent
Returns:
  • void
DataView selectRangeNumber startNumber end[Boolean keepExisting] ) : void
Selects a range of nodes. All nodes between start and end are selected.
Selects a range of nodes. All nodes between start and end are selected.
Parameters:
  • start : Number
    The index of the first node in the range
  • end : Number
    The index of the last node in the range
  • keepExisting : Boolean
    (optional) True to retain existing selections
Returns:
  • void
DataView setAutoScrollBoolean scroll ) : Ext.BoxComponent
Sets the overflow on the content element of the component.
Sets the overflow on the content element of the component.
Parameters:
  • scroll : Boolean
    True to allow the Component to auto scroll.
Returns:
  • Ext.BoxComponent
    this
BoxComponent setDisabledBoolean disabled ) : - Ext.Component
Convenience function for setting disabled/enabled by boolean.
Convenience function for setting disabled/enabled by boolean.
Parameters:
  • disabled : Boolean
Returns:
  • Ext.Component
    this
Component setHeightNumber height ) + Ext.Component
Convenience function for setting disabled/enabled by boolean.
Convenience function for setting disabled/enabled by boolean.
Parameters:
  • disabled : Boolean
Returns:
  • Ext.Component
    this
Component setHeightMixed height ) : - Ext.BoxComponent
Sets the height of the component. This method fires the resize event.
Sets the height of the component. This method fires the resize event.
Parameters:
  • height : Number
    The new height to set. This may be one of:
      -
    • A Number specifying the new height in the Element's Ext.Element.defaultUnits (by default, pixels).
    • + Ext.BoxComponent
      Sets the height of the component. This method fires the resize event.
      Sets the height of the component. This method fires the resize event.
      Parameters:
      • height : Mixed
        The new height to set. This may be one of:
          +
        • A Number specifying the new height in the Element's defaultUnits (by default, pixels).
        • A String used to set the CSS height style.
        • undefined to leave the height unchanged.
      Returns:
      • Ext.BoxComponent
        this
      BoxComponent setPagePositionNumber xNumber y ) @@ -990,10 +997,10 @@ This may be one of:
        : void
        Changes the data store bound to this view and refreshes it. (deprecated in favor of bindStore)
        Changes the data store bound to this view and refreshes it. (deprecated in favor of bindStore)
        Parameters:
        • store : Store
          The store to bind to this view
        Returns:
        • void
        DataView setVisibleBoolean visible ) : - Ext.Component
        Convenience function to hide or show this component by boolean.
        Convenience function to hide or show this component by boolean.
        Parameters:
        • visible : Boolean
          True to show, false to hide
        Returns:
        • Ext.Component
          this
        Component setWidthNumber width ) + Ext.Component
        Convenience function to hide or show this component by boolean.
        Convenience function to hide or show this component by boolean.
        Parameters:
        • visible : Boolean
          True to show, false to hide
        Returns:
        • Ext.Component
          this
        Component setWidthMixed width ) : - Ext.BoxComponent
        Sets the width of the component. This method fires the resize event.
        Sets the width of the component. This method fires the resize event.
        Parameters:
        • width : Number
          The new width to setThis may be one of:
            -
          • A Number specifying the new width in the Element's Ext.Element.defaultUnits (by default, pixels).
          • + Ext.BoxComponent
            Sets the width of the component. This method fires the resize event.
            Sets the width of the component. This method fires the resize event.
            Parameters:
            • width : Mixed
              The new width to set. This may be one of:
                +
              • A Number specifying the new width in the Element's defaultUnits (by default, pixels).
              • A String used to set the CSS width style.
            Returns:
            • Ext.BoxComponent
              this
            BoxComponent show() :