A question from OTN:
You have a page that shows some data in a table, then you pop-up a dialog window where you change the data. Then you close the window - but how do you refresh the table to show the change?
The trick is to invoke a partial page render event on your table when you return from the pop-up.
So in your first page you have a button that looks something like:
< af:commandButton text="Submit" action="dialog:go"
useWindow="true" windowHeight="500"
windowWidth="500" returnListener="#{backing_show.backFromPopup}"/>
Note the returnListener property - this one points to the following piece of code in a backing bean:
public void backFromPopup(ReturnEvent returnEvent) {
AdfFacesContext.getCurrentInstance().addPartialTarget(table);
}
And the table is the backing bean binding to the object you want to refresh.
Comments (5)
it is refreshing the table but the record whatever i added in popup it is not displaying to main page
Posted by ramkumar | June 11, 2008 4:58 AM
Posted on June 11, 2008 04:58
ok
Posted by ramkumar | June 11, 2008 4:59 AM
Posted on June 11, 2008 04:59
could you please sent one example for this refreshing A part of your page.
i tried this one. but i cant get the value after the closing the popup.
Posted by Bharathis | June 17, 2008 6:31 AM
Posted on June 17, 2008 06:31
That works!, very helpfull.
Posted by Aldrin Fuentes | August 27, 2008 2:36 PM
Posted on August 27, 2008 14:36
Hi,
I too am facing the same issue.
My parent page is not getting refreshed after the dialog box closes.
please send me some sample code to achieve this.
Posted by praj | August 14, 2009 6:26 AM
Posted on August 14, 2009 06:26