I'm not going to delve into the logic of your use case.
Just put have one activate handler:
void onActivate(Object[] context)
{
if (context.length == 0)
{
// handle no context
{
else
{
// handle context
{
}
Cheers,
Nick.
Britske wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]