Version 6 by Mircea Toma
on Sep 27, 2013 10:57.

compared with
Current by Philip Breau
on Oct 11, 2013 11:46.

These lines were removed. This word was removed.
These lines were added. This word was added.

View page history

There are 1 changes. View first change.

 h3. @org.icefaces.bean.AllWindowsClosed
 Use the @AllWindowsClosed method annotation with session-scoped beans that need to be notified when all browser windows for that session are closed. This is useful in cases where the application wants to actively cleanup a user-session upon window close.
 @AllWindowClosed annotation will work correctly as long the application is configured with org.icefaces.lazyWindowScope set to false or the application uses window scoped beans in its pages. By doing so the browser will notify the server every time a window is closed and eventually when all windows are closed, @AllWindowClosed annotated methods will be called.
 { with @AllWindowsClosed}
 package org.icefaces.demo;
 import javax.faces.bean.ManagedBean;
 import javax.faces.bean.SessionScoped;
 import org.icefaces.bean.AllWindowsClosed;
 @ManagedBean(name = "mySessionScopedBean")
 public class MySessionScopedBean implements Serializable {
 public void allWindowsForSessionClosed(){
  //clean up code goes here
 In case the annotated method needs access to the current FacesContext the method can define a single parameter of type FacesContext. When the method will be invoked the current FacesContext will be passed in.
 public void allWindowsForSessionClosed(FacesContext context){
  //do something with the context

© Copyright 2021 ICEsoft Technologies Canada Corp.