When using fileEntry in a form we tell people to use an h:commandButton to upload the file, since it's the only thing that will do the standard form submit that we intercept and will upload the file. Usually most other things do direct ajax calls, or are intercepted by our ICEfaces mechanisms, and so will do incremental page updates. But h:commandLink instead calls it's own javascript function that programmatically calls form.submit, which doeasn't cause the onsubmit function to get called, so it doesn't do the proper file upload handling to switch the form to being multi-part etc.
<a href="mojarra.jsfcljs(document.getElementById('myform'),
{'myform:mycmdlnk':'myform:mycmdlnk'}
,'');return false"/>
In the test case, with the non-fileEntry page, ICEfaces' ice.captureSubmit
replaces the form.submit() function with ours. The h:commandLink calls form.submit(), so everything goes through ICEfaces properly.
With the fileEntry page, ACE's captureFileOnsubmit() replaces the form.onsubmit handler with ours. The h:commandLink calls form.submit(), which is then the default one, since ACE only overrides form.onsubmit, and when that happens the core does not override form.submit, so it's just the stock one that does a full page submit.
Attached test case that shows issue:
1. Open source2.xhtml and click the link. In the network traffic (for example with firebug) you'll see the partial-response in the response body. Which is the desired behavior.
2. Open source1.xhtml and click the link. In the network traffic you'll see that the whole page is being sent.