Re: [jsr-314-open-mirror] [jsr-314-open] PostAddToViewEvent publishing conditions
by Martin Marinschek
>
> Now, the instants of time where PostAddToViewEvent is published are:
>
> - With Partial State Saving enabled
>
> * When the view is build at first time.
> * In a postback when the view is build but before the state of the
> component is restored.
>
> - With Partial State Saving disabled
>
> * When the view is build at first time.
> * In a postback when the view is "refreshed", because all component nodes
> are detached and attached to the tree. In other words, on render response
> phase, vdl.buildView is called and in this case facelets algorithm add all
> transient components (usually all html markup not saved), and to do that, it
> detach and attach all components to be in right order. This also has some
> other implications, like c:if tag depends on this to work correctly.
>
This sounds ugly. You are sure that this is the behaviour in both
MyFaces and Mojarra. Here my 2cents:
- Partial state saving should not make any difference at all (also in
partial state saving, the template should be reapplied before
rendering, see my other mail)
- PostAddToViewEvent should be called always after a component has
been added to the view fully, and all its state has been restored
best regards,
Martin
14 years, 9 months