-
Notifications
You must be signed in to change notification settings - Fork 55
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
Clarification: Firing of PostAddToViewEvent during Restore View Phase #1835
Comments
Looking at the spec issues, closest one I found was javaee/mojarra#1387 |
@tandraschko Another thing I spotted: Spec says we should fire PostRestoreStateEvent, but I don't see MF do that in the restore view. |
@volosied about PostRestoreStateEvent -> https://issues.apache.org/jira/browse/MYFACES-4625 |
@volosied no idea about the PostAddToViewEvent |
here is also a old mail from Leo about it:
|
i think in general PostAddToViewEvent works fine for both Impls and normal components, which is also quite good documented in the javadoc. The question is: when exactly is it required to fire the PostAddToViewEvent for the ViewRoot itself? It seems Mojarra just does it once in FaceletViewHandlingStrategy#buildView, without any conditions. MyFaces does it in RestoreViewExecutor, when it's not a postback |
Section 2.2.1 of the Faces Spec says:
My understanding this event should only be fired when the request is not a postback. The JavaDoc is a bit clearer here: https://jakarta.ee/specifications/platform/9/apidocs/jakarta/faces/event/postaddtoviewevent
primefaces-extensions/primefaces-extensions#517 discovered that the PrimeFacesScriptProcessor created JS scripts twice in MyFaces, but not Mojarra. MyFaces has this event fire during the Restore View phase, and Render View phase. Mojarra only it occur during the Render View phase. (Note: this is unrelated to the DuplicateIdException reported in 517)
MyFaces looks to behave incorrectly in practice, but it's contrary to the specification. What is correct here?
The text was updated successfully, but these errors were encountered: