myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Surapuraju, Vamsi" <vsurpur...@pghlogistics.com>
Subject bean with request scope stays longer than I expected????
Date Mon, 19 Jun 2006 17:19:47 GMT
HI,
  below is the sample code
 
    public class DeptBackingBean {
        List employees;
 
        public getAllEmplyees() {
            //code to get all emps
        }
 
        public deleteEmployee() {
        //some code to delete
        }
    }
 
On my jsf page I use getAllEmplyees() to get list and use datatable to
display them. Each row has a delete button with action property mapped
to deleteEmployee. When user clicks on delete button and when when jsf
execution gets into method deleteEmployee I expected employee list to be
empty. Because I declared DeptBackingBean to be request scope bean in
faces-config.xml.  When user clicks on delete button it should be a new
request and I should get a new empty bean. Surprisingly I see all the
employee objects in employee list when I run thru debug.
 
Did I misunderstand something here? Can somebody explain the behavior?
 
Thank You very much in advance.
 
Vamsi Surapuraju
 
 


******************************************************************
"This email and any files transmitted with it are the property of Quadrivius, its subsidiaries,
affiliates, or related companies, are 
confidential, and are intended solely for the use of the individual or entity to whom this
email is addressed. Please notify the 
sender by return email if you are not the intended recipient. If you are not the intended
recipient, you may not copy, retain, print,
disclose, or distribute this message or its contents to any other individual or entity. Quadrivius,
its subsidiaries, affiliates or 
related companies, reserves the right to monitor and review the content of all messages sent
to or from this email address."
******************************************************************



Mime
View raw message