Affects Version/s: 2.0, 2.1
Fix Version/s: None
1. The <?xml version="1.0" encoding="UTF-8"> and <!DOCTYPE> markers is assumed to be valid to keep in the response because jsf.js assumes a servlet environment in which the rendered JSF view takes up the entire DOM in the userAgent/browser.
One current portlet bridge workaround for #1 is to simply strip out the offending markers.
2. During "partial" updates in which the javax.faces.ViewRoot is being replaced in the DOM (which is basically a full update of the view – not really partial), jsf.js attempts to replace everything inside the <body>...</body> elements, which of course is a servlet environment assumption. Instead, it should be the outermost <div> tag rendered by the bridge's BodyRenderer that should be replaced in the DOM.
One current portlet bridge workaround for #2 is to substitute the id value of "javax.faces.ViewRoot" with the id of the outermost <div> tag rendered by the bridge's BodyRenderer.
this provided it is permitted to replace everything inside the <body>...</body> elements, but since we can't let that happen in a portlet environment, the hidden field does not get created.
One current portlet bridge workaround for #3 is to inject the javax.faces.ViewState hidden field into the response if it is not already there.