public static String getStackId(FacesContext facesContext, UIComponent component) { NotifyAttributes notify = (NotifyAttributes) component; if (null == notify.getStack()) { return null; } UIComponent stack = UTILS.findComponentFor(facesContext.getViewRoot(), notify.getStack()); if (stack instanceof AbstractNotifyStack) { return stack.getClientId(); } else { return null; } }