@@ -0,0 +1,1525 @@
+package to.etc.domui.component.delayed;%0A%0Aimport to.etc.domui.component.misc.MsgBox;%0Aimport to.etc.domui.dom.html.Div;%0Aimport to.etc.domui.dom.html.HTag;%0Aimport to.etc.domui.util.Msgs;%0Aimport to.etc.parallelrunner.IAsyncRunnable;%0Aimport to.etc.util.CancelledException;%0Aimport to.etc.util.StringTool;%0A%0A/**%0A * @author %3Ca href=%22mailto:jal@etc.to%22%3EFrits Jalvingh%3C/a%3E%0A * Created on 14-12-21.%0A */%0Aabstract public class AsyncDiv%3CT extends IAsyncRunnable%3E extends Div %7B%0A%09final private T m_runnable;%0A%0A%09private final String m_what;%0A%0A%09public AsyncDiv(T runnable, String what) %7B%0A%09%09m_runnable = runnable;%0A%09%09m_what = what;%0A%09%7D%0A%0A%09@Override%0A%09final public void createContent() throws Exception %7B%0A%09%09String what = m_what;%0A%09%09if(null != what) %7B%0A%09%09%09add(new HTag(1, what));%0A%09%09%7D%0A%09%09add(new AsyncContainer(m_runnable, (cancelled, errorException) -%3E %7B%0A%09%09%09//-- If we've got an exception replace the contents with the exception message.%0A%09%09%09if(errorException != null && !(errorException instanceof CancelledException)) %7B%0A%09%09%09%09//errorException.printStackTrace();%0A%09%09%09%09StringBuilder sb = new StringBuilder(8192);%0A%09%09%09%09StringTool.strStacktrace(sb, errorException);%0A%09%09%09%09String s = sb.toString();%0A%09%09%09%09s = s.replace(%22%5Cn%22, %22%3Cbr/%3E%5Cn%22);%0A%0A%09%09%09%09MsgBox.error(this, Msgs.BUNDLE.getString(Msgs.ASYNC_ERROR) + %22%3Cbr/%3E%22 + s);%0A%09%09%09%7D else if(cancelled) %7B%0A%09%09%09%09MsgBox.info(this, Msgs.BUNDLE.getString(Msgs.ASYNC_CONTAINER_CANCELLED));%0A%09%09%09%7D else %7B%0A%09%09%09%09removeAllChildren();%0A%09%09%09%09createContent(m_runnable);%0A%09%09%09%7D%0A%09%09%7D));%0A%09%7D%0A%0A%09abstract public void createContent(T task) throws Exception;%0A%7D%0A

Add test page, fix 1st issues.