I have a report generation page where I have few filters like countryId
, Date
and few other parameters for the user to select. Now based on the chosen parameters, there is a database call which uses these parameters to fetch a result list .
Now the managed bean contains all these search parameters and the result list .Let us name this bean as Bean1
public class Bean1 implements Constants{
private List<SelectItem> countryList;
private List<String> choosenCountryList;
private List<String> choosenProgramList;
private String invoiceDatePriorTo= CalendarUtilities.getTodaysDate() ;
private List<CustomResults> searchResultList
}
We have one more managed bean Bean2
which contains a property of Bean1
public class Bean2 implements Constants {
private Bean1 bean1;
public getSearchResults(){
//Code for fetching the search list for bean 1
this.setsearchResultList() //=fetched list from DB;
}
public modifySearchResults(){}
}
Now when on the trigger of an action from the JSF page we call the getSearchResults()
method and we set the searchResultList
to be displayed in the screen .In this way we are able to display the search list on screen
Now the list we get is subjected to user modification on screen .Now when we again call the modifySearchResults to edit the list we are not able to retrieve the list in the bean2 because the managed bean is in request scope .
Can anyone tell me how to go ahead and solve this problem?