title: Displaying message in JSF application
body: <p>How is it possible to display a simple message in a JSF application when the mouse moves over a specific element of the interface? I have tried this code, but it didn't work, no message is displayed:</p>
  
  <p>JSF file:</p>
  
  <pre><code>&lt;h:form id ="f"&gt;
  &lt;h:selectManyCheckbox onmouseover="#{hello.message()}" layout="pageDirection" border="1"  value="#{hello.customersSelect}"&gt;
      &lt;f:selectItems value="#{hello.customers}"&gt;&lt;/f:selectItems&gt;
  &lt;/h:selectManyCheckbox&gt;&lt;br /&gt;
  &lt;h:commandButton action="response.xhtml" value="Click me" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>The backing bean Hello (ManagedBean) contains the method message() as:</p>
  
  <pre><code>public void message(){
      FacesContext.getCurrentInstance().addMessage("f", new FacesMessage("Done"));
  }
  </code></pre>
  
  <p>I suppose I should add somewhere a tag h:message, but I couldn't get it done, despite my efforts. Any hint?</p>