title: JSF commandButton 'onclick' event not persistent
body: <p>i want to have a click-able images, which change on roll-over/out/click. needless to say, i want that after the 'onclick' the page won't reload.<br>
  i'm trying to accomplish this with either h:image or h:commandButton - both don't work as expected.
  the most annoying this is this:
  i have in my code-bean the following simple function:</p>
  
  <pre><code>public String getClick()
  {
      return "alert('abc')";
  }
  </code></pre>
  
  <p>and in the jsp file, the following code:</p>
  
  <pre><code>&lt;td&gt;&lt;h:commandButton id="a" type="button" value="click" onclick="#{CodeBean.click}" /&gt;&lt;/td&gt;
  &lt;td&gt;&lt;h:commandButton id="b" type="button" image="/resources/empty.jpg" onclick="#{CodeBean.click}"  /&gt;
  </code></pre>
  
  <p>upon click, both raise the alert box, however, only the second one reloads the page, while the first one doesn't.  don't know what i has to do with it, but when i look at the compiled page's source, i see that the first button's type stays 'button', but the second one is turned into 'image'.</p>
  
  <p>any suggestions?
  cheers,
  eRez</p>