Refreshing the page by java mehtod in Oracle ADF
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.
Read more post on Refreshing the page by java mehtod in Oracle ADF




Comments
Hi Vinay,
Great Article !
Cant we also use the refresh attribute of iterator in page definition to do something similar?
yes we can use.But that will work only to refresh the iterator.This method will refresh the whole page.
Let me know if you have any doubt.
Hi Vinay…
I need auto refreshment with the server data in a whole page in 1 Minute interval.. I m new in Oracle adf.. can u help me regarding this… Thanks in advance..
Trackbacks