Okay, I am observing some odd behavior. I have a backing bean with a custom validation method. In there I added a validation error message using the FacesMessages.add(String, FacesMessage) method. However, when I debug the faces context, the message is there, but the component ID is not. If I use the normal FacesContext to add the message it works.
Works:
public void validUniqueName(FacesContext context, UIComponent toValidate, Object value) { ... context.addMessage(toValidate.getClientId(context), FacesUtils.createErrorMessage("liverep_uniquename", name));
public void validUniqueName(FacesContext context, UIComponent toValidate, Object value) { ... facesMessages.add(toValidate.getClientId(context), FacesUtils.createErrorMessage("liverep_uniquename", name));
16:14:05,231 DEBUG [DebugPhaseListener] Faces message found. Component: lreActionPane:name Severity : Error Summary : A template already exists with the name 'Test report' Detail : A template already exists with the name 'Test report'
16:14:05,231 DEBUG [DebugPhaseListener] Faces message found. Component: null Severity : Error Summary : A template already exists with the name 'Test report' Detail : A template already exists with the name 'Test report'
Use the server id, not the client id.