Tuesday, November 4, 2014

How to perform Redirect in ADF using Managed Bean ?

This blog explains various ways to perform redirect in ADF using Managed bean


Approach 1

FacesContext fcx =FacesContext.getCurrentInstance()
fcx.responseComplete();
fcx.getApplication().getNavigationHandler().handleNavigation(fcx, null, "gotoHomePage");  
fcx.renderResponse();

Approach 2

fcx.responseComplete();  
fcx.getExternalContext().redirect(getServletRequest().getContextPath() + "/pages/HomePage.jspx");

Approach 3

RequestDispatcher dispatcher = getServletRequest().getRequestDispatcher("HomePage.jspx");
dispatcher.forward(getServletRequest(), getServletResponse());

Approach 4
getServletResponse().sendRedirect("gotoHomePage.jspx")


2 comments:

  1. It was so nice article and useful to Informatica learners. we also provide oracle ADF course online training our Cubtraining is leader in providing Software Training

    ReplyDelete
  2. Thanks for such a great website which is helping people who is new to oracle ADF. Your site is very impressive and you are doing an amazing job.For more details about oracle fusion please visit our website...

    Oracle Fusion Training Institute



    ReplyDelete