一些Tapestry FAQ

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.

xml 代码
  1. <component id="valueInsert" type="Insert">  
  2.    <binding name="value" value="getValueAt( rowIndex, columnIndex )"></binding>  
  3. </component>  
  4.   
  5. <component id="valueInsert1" copy-of="valueInsert"></component>  
  6. <component id="valueInsert2" copy-of="valueInsert"></component>  
  7. <component id="valueInsert3" copy-of="valueInsert"></component>  
  8. <component id="valueInsert4" copy-of="valueInsert"></component>  

 

How do I make a link popup a new window?

Use the contrib:PopupLink component.

你可能感兴趣的:(xml,servlet,tapestry)