Topic
  • No replies
Ravi_Hariharan
Ravi_Hariharan
8 Posts

Pinned topic com.sun.faces.VIEW_LIST code for JSF1.2

‏2012-05-15T21:30:18Z |
Hi All,

I am migrating an application from JSF 1.1 to JSF 1.2.

I am not sure how the following code is impacted in JSF 1.2


List lookupList = (List) session.getAttribute(
"LookupList"); 
//has session value like 
//LookupList=[LULAACC, /lookup/LULAACCPage.jsp]





private 

void clearLookupEntries(FacesContext context)
{ HttpSession session = ((HttpServletRequest) context.getExternalContext().getRequest()).getSession(

false); 

if (session == 

null) 
{ logger.info(
"clearLookupEntry ERROR !!! Session is NULL"); 
}

else
{ List lookupList = (List) session.getAttribute(
"LookupList"); 

if(lookupList != 

null)
{   List viewList = (List) session.getAttribute(
"com.sun.faces.VIEW_LIST"); 

for (

int i = 0; i < lookupList.size(); i++) 
{ String key = (String)lookupList.get(i); session.removeAttribute(key); viewList.remove(key); logger.debug(
"clearLookupEntry : Removed key = " + key); 
} lookupList.clear(); 
} 
} 
}

This code is always null in JSF 1.2.

List viewList = (List) session.getAttribute(
"com.sun.faces.VIEW_LIST");

any help is highly appreciated.