On Thu, 22 Mar 2012 10:13:35 -0300, Stephan Windmüller
<stephan.windmuel...@tu-dortmund.de> wrote:
I thought that onActivate should only be used to initialize data
gathered from the activation context and that other intializations
should be done in setupRender.
Have you read this somewhere? I disagree. Any initialization that should
be needed in all requests, AJAX or not, can be done in onActivate(). And
don't forget that Grid with inplace updates is doing AJAX requests. In
addition, you don't even need initialization in some cases. For example,
if I'm using a Grid, I usually don't fetch the data for it in onActivate()
or setupRender(), but in a property which is passed directly to the source
parameter. Something like this:
<table t:type="Grid" t:source="users">
public List<User> getUsers() {
return usersDao.findAll();
}
When an AJAX request is made, the setupRender event is not triggered in
the page nor in components (unless they're inside a zone which is being
updated).
Of course: https://gist.github.com/2158274
It's deleted.
--
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