All I have in that method is a call to stateless ejb which returns list
of employees.
Below is how it is.
public class DeptBackingBean {
List employees;
public List getAllEmplyees() {
//code to get all emps
DeptLocal deptLocal = DepartmentSlsbUtil
.getLocalHome().create();
employees = deptLocal .getAllemployees();
return employees;
}
public void deleteEmployee() {
//some code to delete
}
}
Thank You
Vamsi Surapuraju
724 709 2391
-----Original Message-----
From: Andrew Robinson [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 1:22 PM
To: MyFaces Discussion
Subject: Re: bean with request scope stays longer than I expected????
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."
>
> ******************************************************************