Showing posts with label logout ADF. Show all posts
Showing posts with label logout ADF. Show all posts

Sunday, 30 November 2014

Logout Implement in Oracle ADF

The below code is required for logout in ADF applications.
public String logOut()  throws IOException{
        HttpSession session = null;
          FacesContext fctx = FacesContext.getCurrentInstance();
          ExternalContext ectx = fctx.getExternalContext();
          session = (HttpSession)ectx.getSession(false);
          HttpServletResponse response = (HttpServletResponse)ectx.getResponse();                      String currentPage = "faces/login.jspx";
          String url = ectx.getRequestContextPath()+"/adfAuthentication?logout=true&end_url=" + currentPage;
         try {
             response.sendRedirect(url);
              session.invalidate();
         } catch (Exception ex) {
             ex.printStackTrace();
          }
          fctx.responseComplete(); 
          return null;
      }

Thanks...

Pagination in ADF

We Need to set the ScrollPolicy attribute to Page and autoHeightRow=”0”.
And if you want to display 5 rows in a page then set the RangeSize = 5 in iterator.



The screen will looks like

Thanks...