When performing a postback in a stateless view (f:view transient="true"), then DeferredScript#processEvent() isn't invoked for PostAddToView event. Ultimately, the o:deferredScript still sticks in head instead of body and subsequently CombinedResourceHandler isn't able to find it.
o:onloadScript has same problem.
Fix #45 DeferredScript/OnloadScript fail in stateless views. Tested in
Mojarra 2.2.9 / MyFaces 2.2.6 with all combinations of f:view
transient="true|false", f:ajax render="@all" or not, with/out
I discovered that <o:onloadScript> (and subsequently <o:highlight>) in a stateless view didn't trigger PostRestoreStateEvent at all during ajax postbacks when using MyFaces 2.2.6. All works fine in Mojarra 2.2.9. Needs further investigation if this is a MyFaces bug or not.
I also discovered that <o:deferredScript> wasn't properly relocated in view in a stateless view during postback when using Mojarra 2.2.8 (and possibly older). This is only noticeable when there are multiple <o:deferredScript> components (at least 3) in the view. It seems that view build time actions (relocation of resource component) aren't properly remembered and re-applied during restore view. All works fine in Mojarra 2.2.9.