tags:

views:

193

answers:

1

I have the following code in a listener method:

FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("time", new Date());

When a button is clicked the following code is executed

System.out.println(FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("time"));

One could except that "time" is null when the listener was not executed while processing the current request, but: it seems like the "time" object survives the request processing. So when "time" has been set sometimes in the past it stays there... can anybody explain this? Thanks.

A: 

Found the answer here: http://wiki.icefaces.org/display/ICE/Compatibility Scopes

By default, ICEfaces 1.x operated under what was referred to as extended request scope. In a nutshell, extended request scope refers to the behaviour that a new request is only associated with a change in view. This means that Ajax requests that occur within an existing view are not treated by ICEfaces as new requests. A request is not considered a new request unless it results in a new view so request-scoped beans would not be recreated until a new view was created. This behaviour was configurable to allow for the more standard definition of request scope but was considered necessary at the time because the existing standard scopes (request, session, application, none) were not granular enough.

hubertg