werpu / jsfs_js_ts

Apache License 2.0
2 stars 1 forks source link

test: ajax on tobago-page #46

Closed henningn closed 7 months ago

henningn commented 9 months ago

A response for should only replace it. Currently instead of "..." the whole "..." is inserted. After the ajax response, there are two and two tags. The is duplicated too.

werpu commented 7 months ago

This is not an issue, rather, it's how the current behavior functions. The request sends the entire HTML page to the 'page' update id, which is a Tobago-page element. The code is acting as expected in terms of pushing the entire CDATA section to replace the Tobago-page element. However, the issue arises because this CDATA section represents a complete HTML page, consisting of both, header and body elements. This means the result is an HTML body within which another head and body are existent! If the goal is to replace the entire page, you should use 'jakarta.faces.ViewRoot' as your replacement id. The old MyFaces code, I believe, stripped out invalid elements if an entire page was pushed, but this was not a specified behavior. The new code does not have this feature anymore. It was removed to fix issues in the shadow dom support where exactly this behavior is expected!