Seaside - 当在 "renderContentOn: html" 中直接调用 "html render:" 时,在 WAComponent 中实现#children 有什么意义?
Seaside - What's the point of implementing #children in a WAComponent when a direct call to "html render:" is made in "renderContentOn: html"?
Whatever >> children
^Array with: oneComponent with: anotherComponent.
稍后在代码中可能会有这样的东西。
Whatever >> renderContentOn: html
...
html render: oneComponent.
...
html render: anotherComponent.
既然我显式调用来渲染这些组件,那么将它们放在#children 中有什么用? #children 是否用于其他用途?
Seaside 取决于 #children
以下回调的正确实施:
#updateRoot:
自定义生成的 HTML 文档的头部部分,
#initialRequest:
在会话开始时初始化组件,
#updateUrl:
修改当前URL,
#updateStates:
为回溯注册对象,
- 以及支持辅助方法,如
#states
、#scripts
和 #styles
。
搜索 Seaside Book 这些方法以了解更多信息。
Whatever >> children
^Array with: oneComponent with: anotherComponent.
稍后在代码中可能会有这样的东西。
Whatever >> renderContentOn: html
...
html render: oneComponent.
...
html render: anotherComponent.
既然我显式调用来渲染这些组件,那么将它们放在#children 中有什么用? #children 是否用于其他用途?
Seaside 取决于 #children
以下回调的正确实施:
#updateRoot:
自定义生成的 HTML 文档的头部部分,#initialRequest:
在会话开始时初始化组件,#updateUrl:
修改当前URL,#updateStates:
为回溯注册对象,- 以及支持辅助方法,如
#states
、#scripts
和#styles
。
搜索 Seaside Book 这些方法以了解更多信息。