-
1. Re: Issue with showing error messages in tool tip
jhuska Jun 18, 2013 8:18 AM (in response to jayas)What about rendered attribute which will be bound to the bean method, which will determine whether there are errors and according to that will render the tooltip or not ?
-
2. Re: Issue with showing error messages in tool tip
bleathem Jun 18, 2013 1:26 PM (in response to jhuska)Right, as Juraj suggested, try binding the rendered attribute of the tooltip [1], and try binding it to #{facesContext.validationFailed} [2]
[1] http://docs.jboss.org/richfaces/latest_4_X/vdldoc/rich/tooltip.html
[2] http://docs.oracle.com/javaee/6/api/javax/faces/context/FacesContext.html#isValidationFailed()
-
3. Re: Issue with showing error messages in tool tip
jayas Jun 19, 2013 7:03 AM (in response to jayas)@Juraj, @Brian. Thanks a lot for your suggestions. I followed the approach you mentioned. However to match with the condition in popuppanel, I used "facesContext.maximumSeverity != null" condition to render tooltip.
I tried as below.
<rich:tooltip id="userToolTip" followMouse="false" style="display:table-cell" layout="block" mode="client" rendered="#{facesContext.maximumSeverity != null}">
<span style="white-space: nowrap">
<h:message for="userNumber" style="color:red;" />
</span>
</rich:tooltip>
I am following this approach for multiple components in the screen. Now the problem is tooltip is rendered on all components associated with tooltip even if validation fails for a single component.Is there any option available to find the component whose validation is failed?
Thanks!!!
-
4. Re: Issue with showing error messages in tool tip
bleathem Jun 21, 2013 6:17 PM (in response to jayas)You'll need to track the id's of the failing components in a backing bean, then check if a particular tooltip should be rendered by seeing if the id is present in that backing bean list (vai EL).