ICEfaces
  1. ICEfaces
  2. ICE-6091

@WindowDisposed annotation for disposing beans upon window closing

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta1
    • Fix Version/s: 2.0-Beta2, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2.0
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      When the @WindowDisposed annotation is found on a ViewScoped bean, that bean will be removed from the map when the browser window associated with that view is closed.

        Activity

        Hide
        Ted Goddard added a comment -

        We may also want to consider applying @WindowDisposed to beans in other scopes besides View Scope.

        Show
        Ted Goddard added a comment - We may also want to consider applying @WindowDisposed to beans in other scopes besides View Scope.
        Hide
        Ted Goddard added a comment -

        There are several complexities in the implementation of this feature:

        • the dispose-window request is handled via a ResourceHandler prior to the JSF lifecycle, therefore the ViewRoot and ViewMap are not yet available (and would not normally be available during the processing of this request; it would exit prior to the JSF lifecycle)
        • dispose-window may be invoked on windows containing multiple views (such as portlet or JSP inclusion cases)
        Show
        Ted Goddard added a comment - There are several complexities in the implementation of this feature: the dispose-window request is handled via a ResourceHandler prior to the JSF lifecycle, therefore the ViewRoot and ViewMap are not yet available (and would not normally be available during the processing of this request; it would exit prior to the JSF lifecycle) dispose-window may be invoked on windows containing multiple views (such as portlet or JSP inclusion cases)
        Hide
        Ted Goddard added a comment -

        Window disposal now triggers a JSF lifecycle for the purpose of gaining access to the View Map. This seems slightly heavyweight, but is not that significant given that all other user events also trigger a JSF lifecycle. No render pass is included in this case.

        Show
        Ted Goddard added a comment - Window disposal now triggers a JSF lifecycle for the purpose of gaining access to the View Map. This seems slightly heavyweight, but is not that significant given that all other user events also trigger a JSF lifecycle. No render pass is included in this case.
        Hide
        Ted Goddard added a comment -

        Initial implementation checked in. Note that this version only supports the Servlet case; for Portlets, it will be necessary to propagate the dispose notification to other contexts.

        Show
        Ted Goddard added a comment - Initial implementation checked in. Note that this version only supports the Servlet case; for Portlets, it will be necessary to propagate the dispose notification to other contexts.

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: