New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OnLoadScript: Behavior difference in MyFaces/Mojarra #804
Comments
Deja vu: #366 |
I reopened MyFaces https://issues.apache.org/jira/browse/MYFACES-4378 with the reproducer and the 2 primefaces issues that lead me here. Also the original fix that exposed this BalusC was this one: primefaces/primefaces#11714 I have a client I think using Wildfly 12 and I noticed every time they close and open a tab it keeps adding dynamic resources to the page even though they are already in the Faces Tree. My guess is its some Mojarra bug that has long since been fixed but I was trying to make PrimeFaces code smarter than just appending to the head always. else if (id === PrimeFaces.ajax.RESOURCE) {
$('head').append(content);
} |
Not an OmniFaces bug, closing off. Note:
|
Original PF ticket: primefaces/primefaces#11780
This example works in PF 13.0.7 but does not work in 13.0.8
In order for this to fail it has to have both a <c:if> and a <o:onloadScript>, so I'm not sure where is the bug, but it was working in previous versions.
I provided a minimal reproducer in:
pf-11780.zip
To run it:
mvn clean jetty:run -Pmyfaces23next
FAILSmvn clean jetty:run -Pmojarra23
WORKSThen open http://localhost:8080/primefaces-test/ and check that the autocomplete doesn't work (the call is performed and I can see the results in the xhr response but the update is lost somehow).
Change PF version to 13.0.7 and it works again
Analysis
OK here is why. MyFaces puts it in both
<eval>
section andjavax.faces.Resource
section and Mojarra only puts it in the<eval>
section.Since I added this fix primefaces/primefaces#11714 it must be what is causing the issue.
MyFaces
Mojarra
@BalusC the question is what is the correct place for this the
Resource
oreval
? Is this something MyFaces is doing wrong or is the spec unclear?The text was updated successfully, but these errors were encountered: