dev@jsf-extensions.java.net

onclick doesn't trigger actionListeners

From: Roger Keays <roger.keays_at_ninthavenue.com.au>
Date: Sat, 14 Oct 2006 15:12:56 +1000

Using the onclick attribute to trigger an ajax transaction doesn't
invoke action listeners because the onclick javascript overrides the
regular submit js which sets a hidden parameter to allow the view to
know which button was pressed.

  onclick="var a=function(){DynaFaces.fireAjaxTransaction(this, { render: 'editOrderPanel' }); return false;};var b=function(){clearFormHiddenParams_editOrderForm('editOrderForm');document.forms['editOrderForm']['editOrderForm:j_idcl'].value='j_id27'; document.forms['editOrderForm'].submit(); return false;};return (a()==false) ? false : b();">


For this reason, the only real success I've had so far with DynaFaces is
to override the forms submit() function, but that doesn't help much
unless you want *everything* to be ajax.


-- 
----------------------------------------
Ninth Avenue Software
p: +61 7 3137 1351 (UTC +10)
f: +61 7 3102 9141
w: http://www.ninthavenue.com.au
e: info_at_ninthavenue.com.au
----------------------------------------