Ed Burns wrote:
>>>>>>On Tue, 25 Oct 2005 12:12:54 +0800, Ryan Lubke <Ryan.Lubke_at_Sun.COM> said:
>>>>>>
>>>>>>
>
>RL> Use *AttributeListeners to handle ManagedBean preDestory lifecycle
>RL> instead of users
>RL> having to use ExternalContext maps.
>
>
>RL> SECTION: Modified Files
>RL> ----------------------------
>
>RL> M src/com/sun/faces/config/ConfigureListener.java
>RL> - Implement ServletRequestAttributeListener, HttpSessionAttributeListener,
>RL> ServletContextAttributeListener
>RL> - For the 'remove' case, call through to
>RL> ApplicationAssociate.handlePreDestroy()
>RL> - In the 'replace' case, only call through to
>RL> ApplicationAssociate.handlePreDestroy()
>RL> if the old/new values are different.
>
>RL> + public void attributeReplaced(ServletRequestAttributeEvent event) {
>RL> +
>RL> + String attrName = event.getName();
>RL> + Object newValue = event.getServletRequest().getAttribute(attrName);
>
>Shouldn't this local variable be called oldValue? The same goes for the
>other scopes.
>
>
>
The old value is obtained from event.getValue(). The new value from
calling getAttribute() on the appropriate object.
>Otherwise, r=edburns
>
>
>Ed
>
>