Where is the code (and where is it called) that loads the employees list?

On 6/19/06, Surapuraju, Vamsi <[EMAIL PROTECTED]> wrote:


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."

******************************************************************

Reply via email to