This repository has been archived by the owner on Mar 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Ext_ComponentLoader.html
205 lines (193 loc) · 15.9 KB
/
Ext_ComponentLoader.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="css/style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Ext_Component.html">
<link rel="next" href="Ext_chart_Callout.html">
<link rel="Up" href="index.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Ext" rel="Chapter" href="Ext.html">
<link title="Ext_AbstractComponent" rel="Chapter" href="Ext_AbstractComponent.html">
<link title="Ext_AbstractPlugin" rel="Chapter" href="Ext_AbstractPlugin.html">
<link title="Ext_app_Application" rel="Chapter" href="Ext_app_Application.html">
<link title="Ext_app_Controller" rel="Chapter" href="Ext_app_Controller.html">
<link title="Ext_Base" rel="Chapter" href="Ext_Base.html">
<link title="Ext_button_Button" rel="Chapter" href="Ext_button_Button.html">
<link title="Ext_Class" rel="Chapter" href="Ext_Class.html">
<link title="Ext_Component" rel="Chapter" href="Ext_Component.html">
<link title="Ext_ComponentLoader" rel="Chapter" href="Ext_ComponentLoader.html">
<link title="Ext_chart_Callout" rel="Chapter" href="Ext_chart_Callout.html">
<link title="Ext_chart_Chart" rel="Chapter" href="Ext_chart_Chart.html">
<link title="Ext_chart_Label" rel="Chapter" href="Ext_chart_Label.html">
<link title="Ext_chart_Highlight" rel="Chapter" href="Ext_chart_Highlight.html">
<link title="Ext_chart_Mask" rel="Chapter" href="Ext_chart_Mask.html">
<link title="Ext_chart_Navigation" rel="Chapter" href="Ext_chart_Navigation.html">
<link title="Ext_chart_Tip" rel="Chapter" href="Ext_chart_Tip.html">
<link title="Ext_chart_axis_Abstract" rel="Chapter" href="Ext_chart_axis_Abstract.html">
<link title="Ext_chart_axis_Axis" rel="Chapter" href="Ext_chart_axis_Axis.html">
<link title="Ext_chart_series_Series" rel="Chapter" href="Ext_chart_series_Series.html">
<link title="Ext_chart_theme_Theme" rel="Chapter" href="Ext_chart_theme_Theme.html">
<link title="Ext_container_AbstractContainer" rel="Chapter" href="Ext_container_AbstractContainer.html">
<link title="Ext_container_Container" rel="Chapter" href="Ext_container_Container.html">
<link title="Ext_container_DockingContainer" rel="Chapter" href="Ext_container_DockingContainer.html">
<link title="Ext_container_Viewport" rel="Chapter" href="Ext_container_Viewport.html">
<link title="Ext_Date" rel="Chapter" href="Ext_Date.html">
<link title="Ext_data_AbstractStore" rel="Chapter" href="Ext_data_AbstractStore.html">
<link title="Ext_data_Batch" rel="Chapter" href="Ext_data_Batch.html">
<link title="Ext_data_Errors" rel="Chapter" href="Ext_data_Errors.html">
<link title="Ext_data_Field" rel="Chapter" href="Ext_data_Field.html">
<link title="Ext_data_Model" rel="Chapter" href="Ext_data_Model.html">
<link title="Ext_data_Operation" rel="Chapter" href="Ext_data_Operation.html">
<link title="Ext_data_proxy_Ajax" rel="Chapter" href="Ext_data_proxy_Ajax.html">
<link title="Ext_data_proxy_Proxy" rel="Chapter" href="Ext_data_proxy_Proxy.html">
<link title="Ext_data_proxy_Server" rel="Chapter" href="Ext_data_proxy_Server.html">
<link title="Ext_data_reader_Reader" rel="Chapter" href="Ext_data_reader_Reader.html">
<link title="Ext_data_Request" rel="Chapter" href="Ext_data_Request.html">
<link title="Ext_data_ResultSet" rel="Chapter" href="Ext_data_ResultSet.html">
<link title="Ext_data_Store" rel="Chapter" href="Ext_data_Store.html">
<link title="Ext_data_writer_Writer" rel="Chapter" href="Ext_data_writer_Writer.html">
<link title="Ext_dd_DD" rel="Chapter" href="Ext_dd_DD.html">
<link title="Ext_dd_DDProxy" rel="Chapter" href="Ext_dd_DDProxy.html">
<link title="Ext_dd_DDTarget" rel="Chapter" href="Ext_dd_DDTarget.html">
<link title="Ext_dd_DragDrop" rel="Chapter" href="Ext_dd_DragDrop.html">
<link title="Ext_dd_DragSource" rel="Chapter" href="Ext_dd_DragSource.html">
<link title="Ext_dd_DragTracker" rel="Chapter" href="Ext_dd_DragTracker.html">
<link title="Ext_dd_StatusProxy" rel="Chapter" href="Ext_dd_StatusProxy.html">
<link title="Ext_dom_AbstractElement" rel="Chapter" href="Ext_dom_AbstractElement.html">
<link title="Ext_dom_CompositeElement" rel="Chapter" href="Ext_dom_CompositeElement.html">
<link title="Ext_dom_CompositeElementLite" rel="Chapter" href="Ext_dom_CompositeElementLite.html">
<link title="Ext_dom_Element" rel="Chapter" href="Ext_dom_Element.html">
<link title="Ext_dom_Element_Fly" rel="Chapter" href="Ext_dom_Element_Fly.html">
<link title="Ext_draw_Component" rel="Chapter" href="Ext_draw_Component.html">
<link title="Ext_draw_Sprite" rel="Chapter" href="Ext_draw_Sprite.html">
<link title="Ext_draw_Surface" rel="Chapter" href="Ext_draw_Surface.html">
<link title="Ext_ElementLoader" rel="Chapter" href="Ext_ElementLoader.html">
<link title="Ext_Error" rel="Chapter" href="Ext_Error.html">
<link title="Ext_EventObject" rel="Chapter" href="Ext_EventObject.html">
<link title="Ext_enums_Widget" rel="Chapter" href="Ext_enums_Widget.html">
<link title="Ext_form_action_Action" rel="Chapter" href="Ext_form_action_Action.html">
<link title="Ext_form_Basic" rel="Chapter" href="Ext_form_Basic.html">
<link title="Ext_form_FieldAncestor" rel="Chapter" href="Ext_form_FieldAncestor.html">
<link title="Ext_form_field_Base" rel="Chapter" href="Ext_form_field_Base.html">
<link title="Ext_form_field_Field" rel="Chapter" href="Ext_form_field_Field.html">
<link title="Ext_form_field_Text" rel="Chapter" href="Ext_form_field_Text.html">
<link title="Ext_form_Labelable" rel="Chapter" href="Ext_form_Labelable.html">
<link title="Ext_form_Panel" rel="Chapter" href="Ext_form_Panel.html">
<link title="Ext_grid_column_Column" rel="Chapter" href="Ext_grid_column_Column.html">
<link title="Ext_grid_feature_Feature" rel="Chapter" href="Ext_grid_feature_Feature.html">
<link title="Ext_grid_header_Container" rel="Chapter" href="Ext_grid_header_Container.html">
<link title="Ext_grid_locking_Lockable" rel="Chapter" href="Ext_grid_locking_Lockable.html">
<link title="Ext_grid_Panel" rel="Chapter" href="Ext_grid_Panel.html">
<link title="Ext_grid_plugin_Editing" rel="Chapter" href="Ext_grid_plugin_Editing.html">
<link title="Ext_grid_View" rel="Chapter" href="Ext_grid_View.html">
<link title="Ext_layout_container_Container" rel="Chapter" href="Ext_layout_container_Container.html">
<link title="Ext_layout_ContextItem" rel="Chapter" href="Ext_layout_ContextItem.html">
<link title="Ext_layout_Layout" rel="Chapter" href="Ext_layout_Layout.html">
<link title="Ext_layout_SizePolicy" rel="Chapter" href="Ext_layout_SizePolicy.html">
<link title="Ext_LoadMask" rel="Chapter" href="Ext_LoadMask.html">
<link title="Ext_Loader" rel="Chapter" href="Ext_Loader.html">
<link title="Ext_MessageBox" rel="Chapter" href="Ext_MessageBox.html">
<link title="Ext_menu_Menu" rel="Chapter" href="Ext_menu_Menu.html">
<link title="Ext_panel_AbstractPanel" rel="Chapter" href="Ext_panel_AbstractPanel.html">
<link title="Ext_panel_Panel" rel="Chapter" href="Ext_panel_Panel.html">
<link title="Ext_panel_Table" rel="Chapter" href="Ext_panel_Table.html">
<link title="Ext_Queryable" rel="Chapter" href="Ext_Queryable.html">
<link title="Ext_selection_DataViewModel" rel="Chapter" href="Ext_selection_DataViewModel.html">
<link title="Ext_selection_Model" rel="Chapter" href="Ext_selection_Model.html">
<link title="Ext_selection_RowModel" rel="Chapter" href="Ext_selection_RowModel.html">
<link title="Ext_state_Manager" rel="Chapter" href="Ext_state_Manager.html">
<link title="Ext_state_Provider" rel="Chapter" href="Ext_state_Provider.html">
<link title="Ext_state_Stateful" rel="Chapter" href="Ext_state_Stateful.html">
<link title="Ext_Template" rel="Chapter" href="Ext_Template.html">
<link title="Ext_tip_QuickTip" rel="Chapter" href="Ext_tip_QuickTip.html">
<link title="Ext_tip_QuickTipManager" rel="Chapter" href="Ext_tip_QuickTipManager.html">
<link title="Ext_tip_Tip" rel="Chapter" href="Ext_tip_Tip.html">
<link title="Ext_tip_ToolTip" rel="Chapter" href="Ext_tip_ToolTip.html">
<link title="Ext_util_AbstractMixedCollection" rel="Chapter" href="Ext_util_AbstractMixedCollection.html">
<link title="Ext_util_Animate" rel="Chapter" href="Ext_util_Animate.html">
<link title="Ext_util_Bindable" rel="Chapter" href="Ext_util_Bindable.html">
<link title="Ext_util_ComponentDragger" rel="Chapter" href="Ext_util_ComponentDragger.html">
<link title="Ext_util_ElementContainer" rel="Chapter" href="Ext_util_ElementContainer.html">
<link title="Ext_util_Filter" rel="Chapter" href="Ext_util_Filter.html">
<link title="Ext_util_Floating" rel="Chapter" href="Ext_util_Floating.html">
<link title="Ext_util_Format" rel="Chapter" href="Ext_util_Format.html">
<link title="Ext_util_Grouper" rel="Chapter" href="Ext_util_Grouper.html">
<link title="Ext_util_KeyMap" rel="Chapter" href="Ext_util_KeyMap.html">
<link title="Ext_util_MixedCollection" rel="Chapter" href="Ext_util_MixedCollection.html">
<link title="Ext_util_Observable" rel="Chapter" href="Ext_util_Observable.html">
<link title="Ext_util_Offset" rel="Chapter" href="Ext_util_Offset.html">
<link title="Ext_util_Point" rel="Chapter" href="Ext_util_Point.html">
<link title="Ext_util_Positionable" rel="Chapter" href="Ext_util_Positionable.html">
<link title="Ext_util_Region" rel="Chapter" href="Ext_util_Region.html">
<link title="Ext_util_Renderable" rel="Chapter" href="Ext_util_Renderable.html">
<link title="Ext_util_Sortable" rel="Chapter" href="Ext_util_Sortable.html">
<link title="Ext_util_Sorter" rel="Chapter" href="Ext_util_Sorter.html">
<link title="Ext_Version" rel="Chapter" href="Ext_Version.html">
<link title="Ext_view_AbstractView" rel="Chapter" href="Ext_view_AbstractView.html">
<link title="Ext_view_Table" rel="Chapter" href="Ext_view_Table.html">
<link title="Ext_view_View" rel="Chapter" href="Ext_view_View.html">
<link title="Ext_window_MessageBox" rel="Chapter" href="Ext_window_MessageBox.html">
<link title="Ext_window_Window" rel="Chapter" href="Ext_window_Window.html">
<link title="Ext_ZIndexManager" rel="Chapter" href="Ext_ZIndexManager.html">
<link title="ExtUtils" rel="Chapter" href="ExtUtils.html"><title>Ext_ComponentLoader</title>
</head>
<body>
<div class="navbar"><a href="Ext_Component.html">Previous</a>
<a href="index.html">Up</a>
<a href="Ext_chart_Callout.html">Next</a>
</div>
<center><h1>Module <a href="type_Ext_ComponentLoader.html">Ext_ComponentLoader</a></h1></center>
<br>
<pre><span class="keyword">module</span> Ext_ComponentLoader: <code class="code">sig</code> <a href="Ext_ComponentLoader.html">..</a> <code class="code">end</code></pre>This class is used to load content via Ajax into a ...
<p>
<p>This class is used to load content via Ajax into a <a href="#!/api/Ext.Component" rel="Ext.Component" class="docClass">Ext.Component</a>. In general
this class will not be instanced directly, rather a loader configuration will be passed to the
constructor of the <a href="#!/api/Ext.Component" rel="Ext.Component" class="docClass">Ext.Component</a>.</p>
<h2>HTML Renderer</h2>
<p>By default, the content loaded will be processed as raw html. The response text
from the request is taken and added to the component. This can be used in
conjunction with the <a href="#!/api/Ext.ComponentLoader-cfg-scripts" rel="Ext.ComponentLoader-cfg-scripts" class="docClass">scripts</a> option to execute any inline scripts in
the resulting content. Using this renderer has the same effect as passing the
<a href="#!/api/Ext.Component-cfg-html" rel="Ext.Component-cfg-html" class="docClass">Ext.Component.html</a> configuration option.</p>
<h2>Data Renderer</h2>
<p>This renderer allows content to be added by using JSON data and a <a href="#!/api/Ext.XTemplate" rel="Ext.XTemplate" class="docClass">Ext.XTemplate</a>.
The content received from the response is passed to the <a href="#!/api/Ext.Component-method-update" rel="Ext.Component-method-update" class="docClass">Ext.Component.update</a> method.
This content is run through the attached <a href="#!/api/Ext.Component-cfg-tpl" rel="Ext.Component-cfg-tpl" class="docClass">Ext.Component.tpl</a> and the data is added to
the Component. Using this renderer has the same effect as using the <a href="#!/api/Ext.Component-cfg-data" rel="Ext.Component-cfg-data" class="docClass">Ext.Component.data</a>
configuration in conjunction with a <a href="#!/api/Ext.Component-cfg-tpl" rel="Ext.Component-cfg-tpl" class="docClass">Ext.Component.tpl</a>.</p>
<h2>Component Renderer</h2>
<p>This renderer can only be used with a <a href="#!/api/Ext.container.Container" rel="Ext.container.Container" class="docClass">Ext.container.Container</a> and subclasses. It allows for
Components to be loaded remotely into a Container. The response is expected to be a single/series of
<a href="#!/api/Ext.Component" rel="Ext.Component" class="docClass">Ext.Component</a> configuration objects. When the response is received, the data is decoded
and then passed to <a href="#!/api/Ext.container.Container-method-add" rel="Ext.container.Container-method-add" class="docClass">Ext.container.Container.add</a>. Using this renderer has the same effect as specifying
the <a href="#!/api/Ext.container.Container-cfg-items" rel="Ext.container.Container-cfg-items" class="docClass">Ext.container.Container.items</a> configuration on a Container.</p>
<h2>Custom Renderer</h2>
<p>A custom function can be passed to handle any other special case, see the <a href="#!/api/Ext.ComponentLoader-cfg-renderer" rel="Ext.ComponentLoader-cfg-renderer" class="docClass">renderer</a> option.</p>
<h2>Example Usage</h2>
<pre><code>var cmp = <a href="#!/api/Ext-method-create" rel="Ext-method-create" class="docClass">Ext.create</a>('<a href="#!/api/Ext.Component" rel="Ext.Component" class="docClass">Ext.Component</a>', {
renderTo: <a href="#!/api/Ext-method-getBody" rel="Ext-method-getBody" class="docClass">Ext.getBody</a>(),
tpl: '{firstName} - {lastName}',
loader: {
url: 'myPage.php',
renderer: 'data',
params: {
userId: 1
}
}
});
// call the loader manually (or use autoLoad:true instead)
cmp.getLoader().load();
</code></pre> <br>
<hr width="100%">
<pre><span id="TYPEt"><span class="keyword">class type</span> <a href="Ext_ComponentLoader.t-c.html">t</a></span> = <code class="code">object</code> <a href="Ext_ComponentLoader.t-c.html">..</a> <code class="code">end</code></pre><pre><span id="TYPEconfigs"><span class="keyword">class type</span> <a href="Ext_ComponentLoader.configs-c.html">configs</a></span> = <code class="code">object</code> <a href="Ext_ComponentLoader.configs-c.html">..</a> <code class="code">end</code></pre><pre><span id="TYPEevents"><span class="keyword">class type</span> <a href="Ext_ComponentLoader.events-c.html">events</a></span> = <code class="code">object</code> <a href="Ext_ComponentLoader.events-c.html">..</a> <code class="code">end</code></pre><pre><span id="TYPEstatics"><span class="keyword">class type</span> <a href="Ext_ComponentLoader.statics-c.html">statics</a></span> = <code class="code">object</code> <a href="Ext_ComponentLoader.statics-c.html">..</a> <code class="code">end</code></pre><pre><span id="VALof_configs"><span class="keyword">val</span> of_configs</span> : <code class="type"><a href="Ext_ComponentLoader.configs-c.html">configs</a> Js.t -> <a href="Ext_ComponentLoader.t-c.html">t</a> Js.t</code></pre><div class="info">
<code class="code">of_configs c</code> casts a config object <code class="code">c</code> to an instance of class <code class="code">t</code><br>
</div>
<pre><span id="VALto_configs"><span class="keyword">val</span> to_configs</span> : <code class="type"><a href="Ext_ComponentLoader.t-c.html">t</a> Js.t -> <a href="Ext_ComponentLoader.configs-c.html">configs</a> Js.t</code></pre><div class="info">
<code class="code">to_configs o</code> casts instance <code class="code">o</code> of class <code class="code">t</code> to a config object<br>
</div>
</body></html>