What is Called and When

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().

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
In C++ lambda functions, the capture clause allows you to specify which variables from the surrounding context are accessible inside the lambda body. There are two types of captures in C++ lambda functions: - Value capture: It captures the value of the variable at the time of the lambda creation - Reference capture: It captures the reference to the variable, allowing the lambda to modify the original variable. The capture clause comes after the parameter list and before the function body in the lambda function declaration. It is enclosed in square brackets ([]), which can be followed by either an equal sign (=) or an ampersand (&). Here is an example of a lambda function that captures a variable by value: ``` #include <iostream> int main() { int x = 5; auto lambda = [x]() { std::cout << "x = " << x << std::endl; }; lambda(); // Output: x = 5 return 0; } ``` In this example, the variable `x` is captured by value in the lambda function by including it in the capture clause ([]). The lambda function copies the value of `x` at the time of creation and stores it in its own internal state. When the lambda is called, it prints the value of `x`. The output is `x = 5`, which is the value of `x` at the time of the lambda creation. Here is an example of a lambda function that captures a variable by reference: ``` #include <iostream> int main() { int x = 5; auto lambda = [&x]() { std::cout << "x = " << x << std::endl; x = 10; }; lambda(); // Output: x = 5 std::cout << "x = " << x << std::endl; // Output: x = 10 return 0; } ``` In this example, the variable `x` is captured by reference in the lambda function by including it in the capture clause ([]). The lambda function stores a reference to the variable `x` in its internal state, allowing it to modify the original variable. When the lambda is called, it prints the value of `x`, which is `5`. The lambda function also modifies `x` to `10`. After the lambda is called, the value of `x` is printed, which is `10`.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值