What's the lifecycle of a form submit?
Events will trigger in the following order:
- initialize()
- pageBeginRender() ("rewind")
- rewind of the form / setting of properties
- Deferred listeners (for Submit components)
- Form's listener
- pageEndRender() ("rewind")
- pageBeginRender() (normal)
- pageEndRender() (normal)
The form "rewind" cycle is nothing more than a render cycle where the output is buffered and scrapped rather than written to the servlet output stream. The second pageBeginRender() is triggered during the actual page rendering. You can use requestCycle.isRewinding() to distinguish between these two render cycles.
Can I use the same component multiple times in one template?
No - but you can copy the definition of a component pretty easily.
- <component id="valueInsert" type="Insert">
- <binding name="value" value="getValueAt( rowIndex, columnIndex )"></binding>
- </component>
- <component id="valueInsert1" copy-of="valueInsert"></component>
- <component id="valueInsert2" copy-of="valueInsert"></component>
- <component id="valueInsert3" copy-of="valueInsert"></component>
- <component id="valueInsert4" copy-of="valueInsert"></component>
How do I make a link popup a new window?
Use the contrib:PopupLink component.
本文详细介绍了表单提交的生命周期,包括初始化、渲染等关键阶段,并解释了如何区分重置与正常渲染周期。此外,还提供了在模板中复用组件的方法及创建链接以弹出新窗口的解决方案。
338

被折叠的 条评论
为什么被折叠?



