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
You can’t embedded any
Ext.ComponentinsideExt.XTemplate, because template just describes html-level logic to render something.Ext.Componentat the same time is much more complex than html string. There are two ways for you to achieve your resultExt.getmethod and render your components (widgets) to placeholders (by specifyingrenderToproperty)Ext.XTemplatewhich 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).