Widget ExtJS dentro de una vista

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?

Muchas Gracias

preguntado el 08 de noviembre de 11 a las 18:11

1 Respuestas

You can't embedded any Ext.Component dentro 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

  1. Add some placeholders to your template. Once template (or view) is rendered, you can find placeholders by Ext.get method and render your components (widgets) to placeholders (by specifying renderTo propiedad)
  2. Second option is to have some method in 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).

respondido 08 nov., 11:22

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.