ListPreference listpreference = userObject.getListPreference("Project");
int recordsPerPage = listpreference.getRecordsPerPage();
ListGenerator lg = ListGenerator.getListGenerator(dataSource);
ProjectList DL = ( ProjectList )lg.getProjectList(userId , 0,0 , "" ,"Name");
DL.setTotalNoOfRecords( DL.size() );
String searchStr = req.getParameter("simpleSearch");
String saveSearchStr = req.getParameter("savedSearch");
if(searchStr != null && (searchStr.trim()).length() > 0)
{
searchStr = searchStr.trim();
DL.setSearchString("SIMPLE :"+searchStr);
DL.search();
}
DL.setTotalNoOfRecords(DL.size());
DL.setStartAT(1);
DL.setEndAT(recordsPerPage);
DL.setRecordsPerPage(recordsPerPage);
Set listkey = DL.keySet();
Iterator it = listkey.iterator();
while( it.hasNext() )
{
String str = ( String )it.next();
StringMember sm=null;
ListElement ele = ( ListElement )DL.get( str );
sm = ( StringMember )ele.get("Name" );
sm.setRequestURL("openPopup('ViewProjectDetail.do?rowId="+ele.getElementID()+"&listId="+DL.getListID()+"')");
sm = ( StringMember )ele.get("Entity" );
IntMember im = (IntMember) ele.get("EntityID");
sm.setRequestURL("openPopup('ViewEntityDetail.do?rowId="+((Integer)im.getMemberValue()).intValue()+"&listId="+DL.getListID()+"')");
}
req.setAttribute("projectlookuplist" , DL );
session.setAttribute("projectlookuplist", DL);
req.setAttribute("lookupListName", "projectlookuplist");