RichFaces has a concept called a ResourceLibrary which is a collection of individual resources. For example, according to AjaxResourceLibrary.java, the "org.richfaces:ajax.reslib" resource id refers to a collection of resources such as "jsf.js", "jquery.js", and "richfaces.js"
Currently the bridge's HeadRendererBridgeImpl class assumes a 1::1 mapping between resource and URL. But in the case of a RichFaces ResourceLibrary, it is actually a 1::Many relationship. Because of this, the bridge is not remembering that resources like jquery.js are present in the <head>...<head> section of the portal page, and loads them again after navigating to a different JSF view (via Ajax).
1. Deploy the richfaces4-portlet
2. Create a new portal page named "RICH4"
3. Add the "RichFaces4 Portlet" to the "RICH4" page
4. Reload the "RICH4" page
5. Complete the job applicant form and click "Submit"
6. Click "Submit Another"
Uncaught SyntaxError: Unexpected token <
NOTE: This happens with RichFaces 4.2.0.Final and 4.3.2.Final so it is unrelated to the upgrade performed in
FACES-1530. Also, it happens with and without the fix for FACES-1532 so it seems unrelated to that as well.