for a page, I have two activation-methods:

onActivate()
onActivate(Object[] list);

when i provide an activation context to the page both methods are called
-onactivate() first-.
This seems correct behavior according to some forum-posts i've read. 

However, both methods call a method syncLists() which does a pretty
expensive operation (get search results  based on the activation context or
default if no activation context exists). 

The problem is that now syncLists() is called twice when the page has an
activation-context (based on calling both of the onActivate()-methods).
Obviously this is unwanted. 

However, I can't remove syncLists() from onActivate() (without params),
because a page-access without activation-context should call syncLists() as
well. 

so what i need to do is 
a. have onActivate() not called when an activatecontext exists
b. detect in onActivate() that an activationcontext exists and based on that
not call syncLists(). 
c. don't have syncLists() updated on onActivate() but on a change of the
page (so before the "redirect-after-post") 

I can't find a way to do A. or B. while C. doesn't seem the best option,
because a lot of fields (on the page and in components) would need to be
tagged with @Persist to survive setting them on post and then redirecting. 

Anyone?

Thanks,
Geert-Jan
-- 
View this message in context: 
http://www.nabble.com/-T5-%3A-how-to-prevent-onActivate%28%29-from-firing-with-activationcontext-tf4683298.html#a13382460
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to