title: onclick event on JSF tag
body: <p>How to bind JavaScript <code>onclick</code> event to JSF-tag? 
  Here's my JSF tag:</p>
  
  <pre><code>&lt;h:commandLink value="Edit" action="#{adminBean.edit}"&gt;
  &lt;f:param value="#{user.login}" name="login"/&gt;
  &lt;/h:commandLink&gt;
  </code></pre>
  
  <p>I've managed to bind click-event on a JSP-tag
  JavaScript function:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function deleteUser(link)
  {
      if (confirm("Are you sure?")) {
          window.location = link;
      }
  
      else {
  
      }
  
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Here's my link example in JSP-tag. </p>
  
  <pre><code>out.println("&lt;a href=\"#\" onclick=\"deleteUser('deleteUser.htm?userLogin="+user.getLogin()+"');\"&gt;Delete&lt;/a&gt;");
  </code></pre>
  
  <p>How can I bind the same on-click function to given above JSF-tag ?</p>