I have an h:inputText and an h:message connected to it:
<
Another way to do that is: give an ID to the form, like "form1", then, when add the message, the clientId is "form1:test".