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

o:deferredScript fails during postback of a stateless view #45

Closed
BalusC opened this Issue Jul 11, 2014 · 3 comments

Comments

Projects
None yet
1 participant
@BalusC
Member

BalusC commented Jul 11, 2014

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.

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Jul 11, 2014

Member

o:onloadScript has same problem.

Member

BalusC commented Jul 11, 2014

o:onloadScript has same problem.

@BalusC BalusC closed this in 4181063 Dec 23, 2014

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Dec 23, 2014

Member

Fixed.

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.

Member

BalusC commented Dec 23, 2014

Fixed.

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.

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Dec 30, 2014

Member

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.

Member

BalusC commented Dec 30, 2014

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.

BalusC added a commit that referenced this issue Jan 12, 2015

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
CombinedResourceHandler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment