Powered By Blogger

Thursday, January 20, 2011

Error Message in Dialg or Wizard

To pass the dynamic value to the error use below line

Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] { itemToWorkflowId }));
throw new AbortProcessingException("Invalid node reference");


To simply display the error message use below line
Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(),
"error_wizard_completed_already"));

1 comment: