myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Commented] (MYFACES-4043) PostAddToViewEvent in RENDER_RESPONSE not fired on postback requests when partial-state-saving is turned off
Date Wed, 20 Apr 2016 23:27:25 GMT


Leonardo Uribe commented on MYFACES-4043:

This topic has been studied a lot years ago. See: PostAddToViewEvent publishing conditions

In resume, the intention behind PostAddToViewEvent is to add components or activate some actions
after the component tree is built. When partial state saving is enabled, since it is necessary
to create the "initial state" and then apply the "delta state", PostAddToViewEvent is called
every time the component tree is built, and that means every request. But note that if the
component is correctly implemented, it only should see one call over its lifetime.

When PSS is disabled, the component tree is restored fully, which means facelets algorithm
does not need to create the initial state, and PostAddToViewEvent is not invoked. 

I think the bug is related to primefaces. Probably the component you mention is added using
PostAddToViewEvent, but it is a transient component, so it is not saved later, and when MyFaces
restore the tree, the component is not restored because the component information was not

I'll close this issue as invalid, because I'm 101% sure there is no problem in that part (there
are some ACID junit tests already in MyFaces that test precisely this point) . 

> PostAddToViewEvent in RENDER_RESPONSE not fired on postback requests when partial-state-saving
is turned off
> ------------------------------------------------------------------------------------------------------------
>                 Key: MYFACES-4043
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.9
>         Environment: OS:      Windows 10
> IDE:      Intellij
> Server: Tomcat 8.0.30/Wildfly 10
> JSF-lib: Primefaces 5.3
>            Reporter: Thomas Herzog
> We use priemfaces growl which is an component where message can be displayed. This component
 is marked with the interface AutoUpdatable, which means that these components do not need
to be included in response update ids explicitly and can be added to the response automatically.
This happens in the class *org.primefaces.event.AutoUpdateComponentListener* where a *SystemEvent*
is observed. On postback request the growl will be added to the response update ids if configured
to do so.
> The problem is, that this listener is only called ones on initial get request and not
on the following postback request if partial-state-saving is turned off. If partial-state-saving
is turned on, then the listener gets called on postback request too.
> It seems that the PostAddToViewEvent is not fired on postback request if PartialStateSaving
is turned off but will be fired if turned on.
> See the following link for an running example:

This message was sent by Atlassian JIRA

View raw message