I have the following situation:
after clicking a button, some business logic is done and after it is done, a new tab with a report should be visible.
I have noticed that onsuccess for PrimeFaces command button does not work. The oncomplete however works and does the needful even if there is an error , such as in my case shows a success dialog even if there is an error in my business logic. Tried to use onsuccess but doesn't work. You could try oncomplete as below: