class type t =Inheritsobject
..end
method afterRender : unit Js.meth
Allows addition of behavior after rendering is complete. At this stage the Component’s Element will have been styled according to the configuration, will have had any configured CSS class names added, and will be in the configured visibility and the configured enable state.
method bindStore_view : Ext_data_Store.t Js.t -> unit Js.meth
Changes the data store bound to this view and refreshes it.
Parameters:
Ext_data_Store.t Js.t
The store to bind to this view
method collectData : 'a.
Ext_data_Model.t Js.js_array Js.t ->
Js.number Js.t -> 'a Js.t Js.js_array Js.t Js.meth
Function which can be overridden which returns the data object passed to this DataView's template to render the whole DataView.
This is usually an Array of data objects, each element of which is processed by an
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:
Ext_data_Model.t Js.js_array Js.t
An Array of Ext.data.Models to be rendered into the DataView.
Js.number Js.t
the index number of the Record being prepared for rendering.
Returns:
_ Js.t Js.js_array Js.t
An Array of data objects to be processed by a repeating XTemplate. May also contain named properties.
method deselect : 'b. 'b Js.t -> bool Js.t -> unit Js.meth
Deselects a record instance by record instance or index.
Parameters:
_ Js.t
An array of records or an index
bool Js.t
Set to false to not fire a deselect event
method findItemByChild : Dom_html.element Js.t -> Dom_html.element Js.t Js.meth
Returns the template node the passed child belongs to, or null if it doesn't belong to one.
Parameters:
Dom_html.element Js.t
Returns:
Dom_html.element Js.t
The template node
method findTargetByEvent : Ext_EventObject.t Js.t -> unit Js.meth
Returns the template node by the Ext.EventObject or null if it is not found.
Parameters:
Ext_EventObject.t Js.t
method getNode : 'c. 'c Js.t -> Dom_html.element Js.t Js.meth
Gets a template node.
Parameters:
_ Js.t
An HTMLElement template node, index of a template node, the id of a template node or the record associated with the node.
Returns:
Dom_html.element Js.t
The node or null if it wasn't found
method getNodes : Js.number Js.t Js.optdef ->
Js.number Js.t Js.optdef -> Dom_html.element Js.t Js.js_array Js.t Js.meth
Gets a range nodes.
Parameters:
Js.number Js.t
(optional)
The index of the first node in the range
Js.number Js.t
(optional)
The index of the last node in the range
Returns:
Dom_html.element Js.t Js.js_array Js.t
An array of nodes
method getRecord : 'd. 'd Js.t -> Ext_data_Model.t Js.t Js.meth
Gets a record from a node
Parameters:
_ Js.t
The node to evaluate
Returns:
Ext_data_Model.t Js.t
record The Ext.data.Model object
method getRecords : Dom_html.element Js.t Js.js_array Js.t ->
Ext_data_Model.t Js.js_array Js.t Js.meth
Gets an array of the records from an array of nodes
Parameters:
Dom_html.element Js.t Js.js_array Js.t
The nodes to evaluate
Returns:
Ext_data_Model.t Js.js_array Js.t
records The Ext.data.Model objects
method getSelectedNodes : Dom_html.element Js.t Js.js_array Js.t Js.meth
Gets the currently selected nodes.
Returns:
Dom_html.element Js.t Js.js_array Js.t
An array of HTMLElements
method getSelectionModel : 'e. (#Ext_selection_Model.t as 'e) Js.t Js.meth
Gets the selection model for this view.
Returns:
#Ext_selection_Model.t Js.t
The selection model
method getStore_view : Ext_data_Store.t Js.t Js.meth
Returns the store associated with this DataView.
Returns:
Ext_data_Store.t Js.t
The store
method getStoreListeners : 'f. Ext_data_Store.t Js.t -> 'f Js.t Js.meth
Gets the listeners to bind to a new store.
Parameters:
Ext_data_Store.t Js.t
The Store which is being bound to for which a listeners object should be returned.
Returns:
_ Js.t
The listeners to be bound to the store in object literal form. The scope may be omitted, it is assumed to be the current instance.
method indexOf : 'g. 'g Js.t -> Js.number Js.t Js.meth
Finds the index of the passed node.
Parameters:
_ Js.t
An HTMLElement template node, index of a template node, the id of a template node or a record associated with a node.
Returns:
Js.number Js.t
The index of the node or -1
method initComponent : unit Js.meth
private
The initComponent template method is an important initialization step for a Component. It is intended to be implemented by each subclass of Ext.Component to provide any needed constructor logic. The initComponent method of the class being created is called first, with each initComponent method up the hierarchy to Ext.Component being called thereafter. This makes it easy to implement and, if needed, override the constructor logic of the Component at any step in the hierarchy.
The initComponent method must contain a call to callParent in order to ensure that the parent class' initComponent method is also called.
All config options passed to the constructor are applied to this
before initComponent is called,
so you can simply access them with this.someOption
.
The following example demonstrates using a dynamic string for the text of a button at the time of instantiation of the class.
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');
});
method isSelected : 'h. 'h Js.t -> bool Js.t Js.meth
Returns true if the passed node is selected, else false.
Parameters:
_ Js.t
The node, node index or record to check
Returns:
bool Js.t
True if selected, else false
method onBindStore : 'i. (#Ext_data_AbstractStore.t as 'i) Js.t -> bool Js.t -> unit Js.meth
Template method, it is called when a new store is bound to the current instance.
Parameters:
#Ext_data_AbstractStore.t Js.t
The store being bound
bool Js.t
True if this store is being bound as initialization of the instance.
method onDestroy : unit Js.meth
Allows addition of behavior to the destroy operation. After calling the superclass's onDestroy, the Component will be destroyed.
method onRender : Ext_dom_Element.t Js.t -> Js.number Js.t -> unit Js.meth
Template method called when this Component's DOM structure is created.
At this point, this Component's (and all descendants') DOM structure exists but it has not been layed out (positioned and sized).
Subclasses which override this to gain access to the structure at render time should call the parent class's method before attempting to access any child elements of the Component.
Parameters:
Ext_dom_Element.t Js.t
The parent Element in which this Component's encapsulating element is contained.
Js.number Js.t
The index within the parent Container's child collection of this Component.
method onUnbindStore : 'j. (#Ext_data_AbstractStore.t as 'j) Js.t -> bool Js.t -> unit Js.meth
Template method, it is called when an existing store is unbound from the current instance.
Parameters:
#Ext_data_AbstractStore.t Js.t
The store being unbound
bool Js.t
True if this store is being bound as initialization of the instance.
method prepareData : 'k 'l. 'k Js.t -> Js.number Js.t -> Ext_data_Model.t Js.t -> 'l Js.t Js.meth
Function which can be overridden to provide custom formatting for each Record that is used by this DataView's template to render each node.
Parameters:
_ Js.t
The raw data object that was used to create the Record.
Js.number Js.t
the index number of the Record being prepared for rendering.
Ext_data_Model.t Js.t
The Record being prepared for rendering.
Returns:
_ Js.t
The formatted data in a format expected by the internal template's overwrite() method. (either an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}))
method refresh : unit Js.meth
Refreshes the view by reloading the data from the store and re-rendering the template.
method refreshNode : Js.number Js.t -> unit Js.meth
Refreshes an individual node's data from the store.
Parameters:
Js.number Js.t
The item's data index in the store