I'm not sure if basic
JSF can do this, but I know that RichFaces has a "oncomplete" attribute that can be fired when the action method has run and returned. This only applies to AJAX requests, since non-AJAX submits will reload the entire page, wiping out any JavaScript set up for the previous page display before it can execute.
However, the action method won't run if the builtin validators reject data.
Then again, the whole idea of a popup "data is OK" dialog is a bit suspect, since JSF should be displaying validation errors on the updated web page. So invalid data will cause error display and the action method won't fire. Valid data will cause no error display and the action will fire, and usually at that point, you'll be navigating to to a new page. Although I do have some apps that add a "record 'XYZ' updated successfully" message to the current page and redisplay it.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.