title: ClientListener for RichCommandButton
body: <p>I am required to call a method when mouse hovers onto a <code>RichCommandButton</code> programmatically.</p>
  <pre><code>private UIComponent ImageButton(UIComponent parent){
      RichCommandButton img = new RichCommandButton();
      String imagestyle = &quot;width:120pt; height:120.0pt;margin:10.0pt;&quot;;
      img.setInlineStyle(imagestyle);
      ClientListenerSet set = img.getClientListeners();
      if (set == null) {
                 set = new ClientListenerSet();
              }
      set.addListener(&quot;click&quot;, &quot;handle&quot;);
      img.setClientListeners(set);
      parent.getChildren().add(img);
      AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
      adfFacesContext.addPartialTarget(parent);
      return img;  
  }
  </code></pre>
  <p>and in my JSPX page,</p>
  <pre><code>    &lt;f:facet name=&quot;metaContainer&quot;&gt;
      &lt;af:resource type=&quot;javascript&quot;&gt;
          function handle(evt){  
              var source = evt.getSource();
              AdfLogger.LOGGER.logMessage(AdfLogger.SEVERE, 'gangangan');
              evt.cancel();
          }
      &lt;/af:resource&gt;
      &lt;/f:facet&gt;
  </code></pre>
  <p>It never goes into this function (checked For log message in console on Chrome-&gt;Inspect element). Please let me know how I can invoke a method by <code>mouseOver</code>.</p>