Future of JSF Managed Beans and CDI (JAVASERVERFACES_SPEC_PUBLIC-976)

[JAVASERVERFACES_SPEC_PUBLIC-766] @FlashScoped Flash events required in order to appropriately handle object lifecycle and destruction Created: 15/Mar/10  Updated: 01/Aug/14  Resolved: 28/Oct/11

Status: Closed
Project: javaserverfaces-spec-public
Component/s: Lifecycle
Affects Version/s: 2.0
Fix Version/s: 2.2 Sprint 8

Type: Sub-task Priority: Major
Reporter: lincolnbaxter Assignee: Ed Burns
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 766
Status Whiteboard:

size_medium importance_large


 Description   

we need to be consistent w/ the way the JSF scopes are handled. We currently
have these events:

javax.faces.event.PostConstructViewMapEvent
javax.faces.event.PreDestroyViewMapEvent

javax.faces.event.PostConstructCustomScopeEvent
javax.faces.event.PreDestroyCustomScopeEvent

So we definitely need the following events in JSF 2.0 Rev a

javax.faces.event.PostConstructFlashEvent
javax.faces.event.PreDestroyFlashEvent

Also, can we consider adding the @javax.faces.bean.FlashScoped annotation like
(Dan) mentioned in the last EG meeting? I'm not concerned about enhancing the
JSF bean container. We just needs a common annotation for CDI or Spring
integration. We need a common touch point, so we avoid introducing
@org.jboss.seam.faces.context.FlashScoped.



 Comments   
Comment by Ed Burns [ 18/May/10 ]

I agree we need this. Put to 2.1

Comment by Ed Burns [ 08/Jun/10 ]

triage

Comment by Ed Burns [ 22/Jun/10 ]

importance_large

Comment by Ed Burns [ 24/Jun/10 ]

GlassFish 3.1 M6 at the latest.

Comment by Ed Burns [ 10/Sep/10 ]

Move these to 2.2

Comment by Ed Burns [ 27/Oct/11 ]

After discussion with the reporter on IRC, we have agreed to these names for the events

PostPutFlashValueEvent
PostKeepFlashValueEvent
PreClearFlashEvent

.

Comment by lincolnbaxter [ 27/Oct/11 ]

Ok, no need to implement the additional @FlashScoped annotation within JSF. You can drop that part of this request.

Comment by Ed Burns [ 28/Oct/11 ]

Committed to trunk.

Sending jsf-api/src/main/java/javax/faces/context/Flash.java
Adding jsf-api/src/main/java/javax/faces/event/PostKeepFlashValueEvent.java
Adding jsf-api/src/main/java/javax/faces/event/PostPutFlashValueEvent.java
Adding jsf-api/src/main/java/javax/faces/event/PreClearFlashEvent.java
Adding jsf-api/src/main/java/javax/faces/event/PreRemoveFlashValueEvent.java
Sending jsf-ri/src/main/java/com/sun/faces/context/flash/ELFlash.java
Adding jsf-ri/systest-per-webapp/flash/src/java/com/sun/faces/model/SessionScopedBean.java
Sending jsf-ri/systest-per-webapp/flash/src/java/com/sun/faces/systest/FlashTestCase.java
Adding jsf-ri/systest-per-webapp/flash/web/flash14.xhtml
Sending jsf-ri/systest-per-webapp/flash/web/index.xhtml
Transmitting file data ..........
Committed revision 9437.

Comment by Ed Burns [ 31/Oct/11 ]

On Friday, I noticed that the newly-enhanced flash testcase failed in clustered environments. Upon investigation, I learned that it can't work in a clustered environment, as written. This commit modifies the testcase so that it does work in a clustered environment.

Sending jsf-ri/systest-per-webapp/flash/src/java/com/sun/faces/systest/FlashTestCase.java
Transmitting file data .
Committed revision 9441.

Comment by Manfred Riem [ 01/Aug/14 ]

Closing resolved issue out

Generated at Thu Aug 25 03:33:14 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.