JSF : Better way to check for existence of <h:message for="id"/>
- by user552809
I have a form in which validation error message needs to be displayed below the input elements. The error needs to be highlighted by showing an error bubble around the error message and the input text.
To achieve this, I need to check for the existence of h:messages for individual elements.
I am able to check for the existence of global error messages as follows
<h:panelGroup rendered="#{not empty facesContext.messages}">
</h:panelGroup>
How I can check the same for specific client id (say first name). So something like
faceContent.messages("creditCardNo")
A solution I have currently is to create a custom resolver but was wondering if there is a better solution.