myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Rudolf" <Steven.Rud...@web.de>
Subject CODI ViewAccessScope use-case in use-case approach
Date Mon, 29 Aug 2011 09:44:29 GMT
Hello,

I'm using CODI (v 1.0.1) and I'm loving the ViewAccessScope becaue it is really easy to program
my use cases if I know, that the beans will clean up if I don't access them anymore after
redirecting to the next view. So mainly all my beans are ViewAccessScope and the transfer
of values between screens works with viewParams.

Now I have an "use case in use case" approach, where I have to link from one use case (A)
to another screen (B) only for searching an entity and then link back to the calling use case
(A). I realized it with a simple redirect and I access the A-Bean from the B-view with a ping-method
so that the A-Bean will not be destroyed. But if I link back to the A-view then a new A-Bean
will be created because the A-view doesn't know the old A-Bean anymore.

I think that the assignement of bean to view is destroyed after redirecting to B-view so that
the render of A-view will create a new A-Bean. After looking to the CODI sources I think that
will be done in org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ViewAccessConversationExpirationEvaluator.

How can I program my use-case? Is there a ViewAccess-ExceptOneSpecialLink-Scope poossible?
Maybe I can write a PhaseListener where I can plant the old A-Bean to the new rendered A-view?

Respectfully,
Steven Rudolf

___________________________________________________________
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

Mime
View raw message