In Oracle ADF, for refreshing the page after doing some operation in database we need to refresh the Page ,which is very needed to display the right content.For this we need to write java method in page.java file. Write that method anywhere in java file and call that method anywhere where you want to refresh the page.
protected void refreshPage() { FacesContext fc = FacesContext.getCurrentInstance(); String refreshpage = fc.getViewRoot().getViewId(); ViewHandler ViewH = fc.getApplication().getViewHandler(); UIViewRoot UIV = ViewH.createView(fc refreshpage); UIV.setViewId(refreshpage); fc.setViewRoot(UIV); }
This is only method you need to write to refresh the page.