ICEfaces
  1. ICEfaces
  2. ICE-10257

@WindowDisposed - ViewScoped bean constructor called on redirect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.BETA, EE-3.3.0.GA_P02
    • Fix Version/s: 4.0, EE-3.3.0.GA_P03
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      All

      Description

      When using the @WindowDisposed annotation for a ViewScoped bean, this beans constructor is called when doing a redirect to a new page.

      Scenario:
       - TestBean - ViewScoped bean
       - PageBean - ViewScoped Bean

      When the page that uses TestBean is loaded the constructor is called as expected. This page has a commandButton which will do a redirect to the page that uses PageBean. On click of this button the TestBean constructor is called as well as the PageBean constructor.

      Removing the @WindowDisposed annotation prevents this additional call to the constructor.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #45798 Tue Jul 28 13:59:48 MDT 2015 mircea.toma 10729 Ported forward ICE-10257 changes to fix view scoped bean's double disposal.
        Files Changed
        Commit graph ADD /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/IcefacesBeanDestroyRecorder.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #45796 Mon Jul 27 16:05:52 MDT 2015 mircea.toma 10729 Ported forward ICE-10257 changes to fix view scoped bean's double disposal.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44031 Mon Feb 09 16:10:06 MST 2015 mircea.toma ICE-10257 Replace disposed view scoped beans with no-op bean during redirect navigation to avoid having them recreated on dispose-window request.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/resources/META-INF/faces-config.xml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #42697 Mon Oct 06 12:50:16 MDT 2014 mircea.toma ICE-10257 Run the disposal of view or window scoped beans before the render phase is executed. This will also short-circuit the JSF lifecycle early to avoid having the beans initialised.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: