Hiding/Showing dialogs at backing bean – primefaces

Posted: November 13, 2012 in web

xthml:

<p:commandButton value="Submit" action="#{bean.save}" />

<p:dialog widgetVar="dialogWidget"  ... />

bean:

public void save() {
	RequestContext rc = RequestContext.getCurrentInstance();
	rc.execute("dialogWidget.hide()");

}

source:

http://blog.primefaces.org/

Advertisements
Comments
  1. Marcos Gabriel says:

    Thanks!

  2. Rafa says:

    If the command button is in a differente form than Dialog, Dialog does’nt show up, can you help me on this?

  3. Jose says:

    Thanks!!!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s