Click the "create components" button: modal window is displayed (can repeat)
Click the "upload" button
Upload anything (or nothing) and click the upload button
Exception happen during fileUpload event listener (mimicked by hardcoded throw in that example, but could be any processing issue located in the event handler)
FileUpload button no longer show modal upload window
Create components no longer show modal window
Error in fileupload shouldn't break createComponents
Component org.zkoss.zk.ui.Execution.createComponents(String uri, Component parent, Map<?, ?> arg)
is used to create the fileUpload popup with values: exec.createComponents(_templ, null, params);
The parent field is null, so UiVisualizer will use the sibling grouping to render the component:
and will use AuInsertAfter to add it after the last created thing in the page group.
At client side, this trigger a call to zAu.cmd1.addAft targetting the fileupload popup window.
However, that window no longer exist at client, but wasn't cleared at server side.
Therefore, the addAft command fails at client, since it fails to find the previous sibling used as anchor.
Manually catch and handle exceptions in FileUpload