views:

214

answers:

1

Hi, How can I execute a backing bean action when a user double clicks on a menu? e.g. using a selectManyListbox I assume I would need some javascript to execute a backing bean action using ondblclick.

Is there a way to do this?

Thanks, Dwayne

+1  A: 
<h:selectManyListBox 
   ondblclick="document.getElementById('yourFormId').submit()" />

(or use one of numerous ways to obtain the parent form and submit it)

Bozho
Note that this is not part of DOM0 spec, but a defacto standard. Browser support is pretty good, but standards support not.
BalusC