I've tried this workaround and it works sometimes but it's not 100% reliable. By clicking the Big DOM link, refreshing, clicking the link, Refreshing, etc. I can reproduce the problem about half of the time. The problem is still that the PhaseListener executes (so the async push is triggered) after the JSF view has been rendered, but before the DOM has been updated in the browser. The retrieveUpdate(view) function in application.js then tries to get the retrieve-update form for the view but it's getting the old form:
<form action="/iceasync/welcome.jsf" id="vlktwhjc-retrieve-update" method="post" name="vlktwhjc-retrieve-update">
instead of the new one:
<form action="/iceasync/bigdom.jsf" id="vlktwhjc-retrieve-update" method="post" name="vlktwhjc-retrieve-update">
and this causes the actual HTTP POST to retrieve the updates to be posted to /iceasync/welcome.jsf instead of /iceasync/bigdom.jsf. In ICEfaces 1.8.2 this POST was made to /iceasync/block/receive-updates and the view ID was passed in as a parameter, so this problem did not exist.
I don't think this problem can be solved on the server-side (without adding some artificial delay) - the only way I can work around this problem is to add some Javascript to the end of the resulting DOM to notify the server that the DOM has been updated and the async push can be triggered. I have attached the new versions of the bigdom.xhtml and PageBean. Using this workaround the everything works fine but it causes an extra HTTP POST to notify the server that we are ready to receive the async push. As we are using async pushes extensively this will drastically increase the traffic between the browser and the server and I don't think it's an acceptable workaround.
Attached test case that reproduces the issue. Note: for the war file the icefaces-ace and icefaces-compat jars need to be added back in.
Steps:
When clicking on the "Go to small DOM" link the navigation to the new view completes successfully and the async render is pushed to the new view. When clicking the "Go to big DOM" link the server error will be observed.