Can't logout in ADF ?
Hi,
I used JDev.11.1.1.2
I have a logout button on main page, and the action property of the button refers to a method in managed bean, like the following code:
public String logout() throws IOException{
ExternalContext ectx =
FacesContext.getCurrentInstance().getExternalContext();
HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
HttpSession session = (HttpSession)ectx.getSession(false);
session.invalidate();
response.sendRedirect("LoginPage.jspx");
return null;
}
But when I click the log out button, it reports error "<QueryRenderer><renderTools> A null QueryModel object was found" and still on the current page.
I search the forum and found that "The ADF pageFlowScope is stored in the session, which means that removing the session removes all the memory the taskflows has.", it really works when remove "session.invalidate()".
but the code is the same with sample code in Section 40.6.2 in <Fusion Developer's Guide for Oracle ADF.pdf> , and Page 263 in <oracle_fusion_developer_guide.pdf>, so I think it should be OK using "session.invalidate()".
thanks,
zeroxin