On Mon, 06 Jun 2011 13:35:01 -0300, Rich M <rich...@moremagic.com> wrote:

Well does it have to be persisted? I call the adminUser() in every class
where it is necessary. The updatePoints() is the constructor so it will be called when the page is loading?

Absolutely no.

You might want to refresh your knowledge of the page render lifecycle and how pages/components operate in T5, based on your comment here.

http://tapestry.apache.org/page-life-cycle.html

Someone else might be better able to explain, but to my knowledge, a page is only constructed a minimal amount of times and re-used within the application. The page is not constructed to render a response for a request.

Until 5.1, with the page pool, pages were instantiated and then reused later, so the constructor is invoked once per instance in the pool and never again. From 5.2 on, a single page instance is used, so the page's constructor is invoked exactly once.

You'd be looking to call the logic for a page "loading" or rather being requested in the onActivate method, or a render phase like @SetupRender.

Absolutely correct.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to