request.setAttribute(AccountConstantKeys.TYPEOFSUBMODULE, AccountConstantKeys.EXPENSE);
request.setAttribute("body", "list");
UserObject userobjectd = (UserObject)session.getAttribute( "userobject" );//get the user object
int individualID = userobjectd.getIndividualID();
ListPreference listpreference= userobjectd.getListPreference("Expense");
ExpenseList displaylistSession = null;
ExpenseList displaylist = null;
// After performing the logic in the DeleteHanlder, we are generat a new request for the list
// So we will not be carrying the old error. So that we will try to collect the error from the Session variable
// Then destory it after getting the Session value
if (session.getAttribute("listErrorMessage") != null)
{
ActionErrors allErrors = (ActionErrors) session.getAttribute("listErrorMessage");
saveErrors(request, allErrors);
session.removeAttribute("listErrorMessage");
}//end of if (session.getAttribute("listErrorMessage") != null)
try
{
displaylistSession = ( ExpenseList )session.getAttribute( "displaylist") ;//gets the list from session
}
catch( Exception e )
{
displaylistSession = null;
}
try
{
displaylist = ( ExpenseList )request.getAttribute( "displaylist") ;//gets the list from request
}
catch( Exception e )
{
displaylist = null;
}
ListGenerator lg = ListGenerator.getListGenerator(dataSource);//get the List Generator object for Listing
ExpenseList DL = null ;
if( displaylist == null )
{
int records = listpreference.getRecordsPerPage();//gets the initial record per page to be displayed from listPreference
String sortelement = listpreference.getSortElement();//gets the initial sort element from listPreference
DL = (ExpenseList)lg.getExpenseList( individualID , 1, records , "" ,sortelement);//called when the request for the list is for first time
DL = setLinksfunction( DL );
}
else
{