Reputation: 2444
I am creating a new ExtJS widget using Ext.view.View. The template for this view needs to have another ExtJS widget inside it.
When a store is associated to the view, the template item rendered on the page would contain another extjs widget.
I could not find any documentation around how to embed another extJS widget inside a template.
If I cannot embed a widget inside a template, is there any way I can associate extjs component and store and render the component per item in the store?
Thanks
Upvotes: 1
Views: 1466
Reputation: 8269
You can't embedded any Ext.Component
inside Ext.XTemplate
, because template just describes html-level logic to render something. Ext.Component
at the same time is much more complex than html string. There are two ways for you to achieve your result
Ext.get
method and render your components (widgets) to placeholders (by specifying renderTo
property)Ext.XTemplate
which will get your widget and extract some html from it (in case if your widget doesn't have any logic, and simply just an html).Upvotes: 3