Wendell is right, h:commandLink does have an onclick attribute. But if you write:
<h:commandLink onclick="return confirm('Are you sure?');" ...>
The behaviour will not be right: the confirm dialog pops up, but pressing OK seems to have the same effect as pressing cancel! If you view the source code for the HTML page you will see why:
<a onclick="return confirm('Are you sure?'); ... more stuff ..."
JSF is also adding script to the link's onclick attribute. Zut! The simplest fix is to take that into consideration in your script:
<h:commandLink onclick="if (!confirm('Are you sure?')) return false;" ...>
[ June 01, 2006: Message edited by: Jeff Albertson ]