Wednesday, January 13, 2010

renderTo vs. applyTo

When I started to use ExtJS, I was confused what is different between Ext.Component's 'renderTo' and 'applyTo' configuration option. And I think it's the same problem with other developers who have just started to work with ExtJS. Here is my understanding about 'renderTo' and 'applyTo':

  • renderTo: The place where the component will be rendered (it's usually a DIV)
  • applyTo: It's usually a DIV also. But more than that, it defines the UI structure of the component (example: header, body,... of the Window)

Hope that help for new guys have just started with ExtJS :-)

No comments: