I open a Dialog using Primefaces dialog framework
RequestContext.getCurrentInstance().openDialog("myDialog", options, null);
Then, I want to update a component in the base page after the dialog's close event. I know we could add a 'dialogReturn' ajax event
<p:ajax event="dialogReturn" update = ":form:colors" />
But how to do this programmatically using the dialog framework?
Workaround:
assign the action to open the dialog to a button; with javascript call the click() method of that button and assign a dialogReturn to it: