admin管理员组文章数量:1193168
What is the difference between events like afterLayout and layout, afterRender and render? I understand the difference between beforeLayout and afterLayout -- but how does layout event differ?
What is the difference between events like afterLayout and layout, afterRender and render? I understand the difference between beforeLayout and afterLayout -- but how does layout event differ?
Share Improve this question asked Aug 7, 2010 at 10:27 TowerTower 103k131 gold badges364 silver badges518 bronze badges1 Answer
Reset to default 26Note: Applies to Ext 3.x only. This was answered in 2010.
There is no 'layout' event, only afterLayout
. From the docs, afterLayout "Fires when the components in this container are arranged by the associated layout manager" which is pretty self-explanatory. afterLayout
is only fired by Container subclasses that are responsible for laying out child components.
One the other hand, all Component subclasses (including Containers) fire the render
and afterRender
events. The basic difference is simply that afterRender
fires later. render
fires after the DOM markup is finished rendering, but before other things that might happen (like hiding, disabling, state-restoration, etc.) during the rendering process. afterRender
fires as the very last event after all of that is complete. To fully understand this you should look at the source for the Ext.Component.render()
method, which shows step-by-step how the rendering process works and when these events are fired.
本文标签: javascriptafterLayout vs layoutafterRender vs renderetc in ExtJSStack Overflow
版权声明:本文标题:javascript - afterLayout vs layout, afterRender vs render, etc. in ExtJS? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738424624a2086053.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论