protected boolean isInDialogPreparation() {
        String dialogOutcome = (String) FacesContext.getCurrentInstance().getAttributes().get(Constants.DialogFramework.OUTCOME);
        return LangUtils.isNotEmpty(dialogOutcome);
    }
Keeps objects within Flash during opening a Dialog Framework - dialog and so allows passing objects via Flash to a Dialog Framework - dialog.
primefaces/src/main/java/org/primefaces/application/DialogKeepFlashPhaseListener.java