org.zkoss.zk.ui.util
Interface ExecutionCleanup


public interface ExecutionCleanup

Used to clean up an execution.

How this interface is used.

  1. First, you specify a class that implements this interface in WEB-INF/zk.xml as a listener.
  2. Then, even time ZK loader is destroying an exection, an instnace of the specified class is instantiated and cleanup(org.zkoss.zk.ui.Execution, org.zkoss.zk.ui.Execution, java.util.List) is called.

Author:
tomyeh

Method Summary
 void cleanup(Execution exec, Execution parent, java.util.List errs)
          called when an execution is about to be destroyed.
 

Method Detail

cleanup

void cleanup(Execution exec,
             Execution parent,
             java.util.List errs)
             throws java.lang.Exception
called when an execution is about to be destroyed.

If this method throws an exception, the stack trace will be logged, and the error message will be displayed at the client.

Parameters:
exec - the exection to clean up.
parent - the previous execution, or null if no previous at all
errs - a list of exceptions (java.lang.Throwable) if any exception occured before this method is called, or null if no exeption at all. Note: you can manipulate the list directly to add or clean up exceptions. For example, if exceptions are fixed correctly, you can call errs.clear() such that no error message will be displayed at the client.
Throws:
java.lang.Exception


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.