T5 page lifecycle favorites

Source: Internet
Author: User

T5 page lifecycle favorites

I sorted it out based on the official documents and understanding of tapestry. If anything is wrong, please criticize and correct it.

 

According to the official statement, the T5 page is cached in a page pool after the first access to facilitate access by other users.

The page lifecycle is also simple.

The function execution sequence for the first access to the page is as follows:

This is how tapestry instantiates the current page.

1. pageloaded can initialize some common page parameters here. The variable values here are shared with all requests.

 

2. pageattached attaches the page to the current request

 

3, pagepassivate this method can pass the context between pages see: http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html

 

4. pagedetached page to strip the current request.

 

5. pageattached attaches the page to the current request (the method has been executed twice here, but it is not clear yet)

 

6. pageactivate page activation function. This function is very useful. We need to perform user verification and initialize some parameters required by the current request.

 

7. The pagepassivate method can pass context between pages.

 

8. The pagedetached page splits the current request and returns it to the page pool.

 

When other users access the page, the execution sequence of the page method is the same as that above, but the pageloaded method is missing, because the page already exists in the page pool and can be directly used.

, Greatly improving the page execution speed. Note that other users are requesting this page, not refreshing this page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.