What is Called and When

来源:互联网 发布:java视频百度云 编辑:程序博客网 时间:2024/05/16 08:04

This page demonstrates what methods are called, and when, in various situations.

It provides, and logs, every page lifecycle method, several render phase methods, and every component event handler method.
Here is what you will see in the logs if you configure log4j to record this page at debug level:

When this page is first instantiated.

pageLoaded()


When Tapestry creates a URL to this page.
Eg. as it renders a PageLink to this page.
...onPassivate()
...Tapestry creates a URL to the page
pageDetached()

 


In response to a render request.
  • onPassivate() is triggered by each ActionLink, EventLink, and Form, as it renders.
  • onPrepareForRender() and onPrepare() are triggered by Form as it renders.

pageAttached()
...onActivate()
...setupRender()
...beginRender()
...getMessage()
...onPassivate()
...onPassivate()
...onPassivate()
...onPrepareForRender()
...onPrepare()
...afterRender()
...cleanupRender()
pageDetached()
Tapestry returns page to browser



In response to request from ActionLink.
Eg. Home

pageAttached()
...onActivate()
...onAction()
...Tapestry creates a URL to next page
pageDetached()
Tapestry returns URL of next page to browser



In response to request from EventLink.
Eg. Home

pageAttached()
...onActivate()
...onClicked()
...Tapestry creates a URL to next page
pageDetached()
Tapestry returns URL of next page to browser



In response to request from Form.
Eg.

pageAttached()
...onActivate()
...onPrepareForSubmit()
...onPrepare()
...onSelected()
...onValidateForm()
...onSuccess()
...onSubmit()
...Tapestry creates a URL to next page
pageDetached()
Tapestry returns URL of next page to browser




Message: This message is generated by getMessage().

原创粉丝点击