Reputation: 1255
Hi I need to display a tool-tip in a jsf element based on a flag value(true/false).
Element:
<h:outputLabel value="#{msg['dealsheet.label.nonpromoted']}" />
Tooltip Text: "This denotes the status of the deal"
Condition: #{ds.partialLockOutFlag}
When the value of the above flag is true, the tooltip message should be visible over the label while hovering.
Can anyone advice how to achieve this?
Upvotes: 0
Views: 1296
Reputation: 516
You can display your message when true, otherwise display empty string:
<h:outputLabel value="#{msg['dealsheet.label.nonpromoted']}" title="#{ds.partialLockOutFlag} ? 'This denotes the status of the deal' : '' " />
Upvotes: 1