For 1.7.2-SP2, instead backporting your patch, we fixed it with the following in InputFileRenderer.java:
103c111,116
< "var frame = document.getElementById('" + frameName + "').contentWindow;" +
—
> "var frameElem = document.getElementById('" + frameName + "');" +
> "if (!frameElem)
{ setTimeout(register, 100); return; } " + // wait until the frame is found
> "var frame = frameElem.contentWindow;" +
> "if (!frame) { setTimeout(register, 100); return; }
" + // wait until the frame is available;
> "var formContainer = frame.document.getElementsByTagName('form'); " + // make sure the form to upgrade progres exists, otherwise wait!
> "if (!formContainer || !formContainer[0])
{ setTimeout(register, 100); return; }
" +
perhaps an exageration.. it is basically waiting recursively until the element needed is present.
We used the provided (thank you very much) filter to force the error, and once this code was applied, the component works as expected.
For our purposes we added this code to a custom renderer and overrode the default in faces-config.xml
Hope it helps somebody... Thanks Ryagin for the filter!
Attached sample application installs a servlet filter which delays rendering of IFRAME content by 3 seconds.
To test: