Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-2985

Viewscoped bean does not get destroyed when navigating with faces-redirect to a non-jsf-page

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2
    • 2.0.3
    • JSR-314
    • None
    • jdk 1.6.0_22, myfaces 2.0.2, jboss 4.2.3, windows and linux

    Description

      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.

      Attachments

        1. viewscope.zip
          1 kB
          Marco Rinck

        Activity

          People

            lu4242 Leonardo Uribe
            romulus Marco Rinck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: