}
KnowledgebaseList DL = null;
if (displaylist == null)
{
ListGenerator lg = ListGenerator.getListGenerator(dataSource);
int records = listpreference.getRecordsPerPage();
String sortelement = listpreference.getSortElement();
// If we are not coming from customer View List handler than we must have
// to set the as false.
// Otherwise true.
boolean customerViewFlag = false;
DL = (KnowledgebaseList)lg.getKnowledgebaseList(individualID, 1, records, "", sortelement, requestCategoryID, customerViewFlag);
DL = setLinksfunction(DL);
DL.setCurrentCategoryID(requestCategoryID);
} else {
String searchSession = displaylistSession.getSearchString();
String searchrequest = displaylist.getSearchString();
if (searchSession == null)
{
searchSession = "";
}
if (searchrequest == null)
{
searchrequest = "";
}
if (((displaylistSession.getCurrentCategoryID() == displaylist.getCurrentCategoryID()) && (displaylistSession.getListID() == displaylist.getListID()) && (displaylist.getDirtyFlag() == false) && (displaylist.getStartAT() >= displaylistSession.getBeginIndex()) && (displaylist.getEndAT() <= displaylistSession.getEndIndex())
&& (displaylist.getSortMember().equals(displaylistSession.getSortMember())) && (displaylist.getSortType() == (displaylistSession.getSortType()) && (searchSession.equals(searchrequest))))
|| displaylist.getAdvanceSearchFlag() == true)
{
DL = (KnowledgebaseList)displaylistSession;
request.setAttribute("displaylist", displaylistSession);
} else {
ListGenerator lg = ListGenerator.getListGenerator(dataSource);
DL = (KnowledgebaseList)lg.getKnowledgebaseList(individualID, requestCategoryID, displaylist);
DL.setCurrentCategoryID(requestCategoryID);
}
DL = setLinksfunction(DL);
}
session.setAttribute("displaylist", DL);