[ 
https://issues.apache.org/jira/browse/MYFACES-2985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonardo Uribe resolved MYFACES-2985.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.3-SNAPSHOT
         Assignee: Leonardo Uribe

I tried the example and yes, we are not cleaning the viewMap when there is a 
redirect. In theory, this is done when FacesContext.setViewRoot is called, but 
in this case it is not necessary, so we need to force this cleanup. I also 
tried this one against mojarra 2.0.3 and it works there. Thanks for report this 
one.

> Viewscoped bean does not get destroyed when navigating with faces-redirect to 
> a non-jsf-page
> --------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2985
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2985
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.2
>         Environment: jdk 1.6.0_22, myfaces 2.0.2, jboss 4.2.3, windows and 
> linux
>            Reporter: Marco Rinck
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.3-SNAPSHOT
>
>         Attachments: viewscope.zip
>
>
> I have a jsf page wich is using (only) one viewscoped backing bean. When I 
> want to navigate away from this jsf page to another non-jsf-page (in my case: 
> jsp page) I wanted to use implicit navigation. 
> If the outcome of the action of a commandbutton is "index.jsp" and I click 
> this button I see the jsp page and the viewscoped bean is destroyed just fine 
> (checked with @Predestroy annotation and System.out.println). Of course, in 
> this case the browser displays still the jsf page in address bar. 
> If the outcome of the action is "index.jsp?faces-redirect=true" the browser 
> displays the jsp page and the correct url in address bar. BUT ... the 
> viewscoped bean is NOT destroyed! When clicking a link on the jsp page back 
> to the jsf page, this leads to another instance of the viewscoped bean and so 
> on .. if user is switching back and forth between those 2 pages, I get more 
> and more instances of the viewscoped bean where there should be only one.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to