How to refresh a page on closing a dialog framework.

UI Components for JSF
Post Reply
sudhir43
Posts: 2
Joined: 05 Sep 2014, 07:29

09 Sep 2014, 08:39

Hi,

I created a jsf page Sample.xhtml. IN sample.xhtml there is one commandLink is there. On clicking the commandLink I'm opening another jsf page dialog.xhtml by using RequestContext.getCurrentInstance().openDialog("diaog",options,null).
While closing the the dialog I've to refresh the Sample.xhtml. Can anybody give solution for this.....


Sudhir K

Primefaces 4.0/JSF 2.1/Java 1.7/Tomcat 7

User avatar
snooperman
Posts: 155
Joined: 06 Nov 2012, 18:43

09 Sep 2014, 16:24

Put

Code: Select all

onclick="location.reload();"
in your button that closes the dialog.
var details = {
. . PF.version: "5.0.x",
. . JSF.version: "2.x",
. . Tomcat.version: "8.x"
}

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

11 Sep 2014, 12:51

Make sure you shouldn't use this callback for commandButton directly.Normally dialog component will have close event to do this job.It looks like dialogReturn event not captured for close actionhttps://code.google.com/p/primefaces/is ... il?id=6278.I think only closable option added.But Try out from your side.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 44 guests