dev@jsf-extensions.java.net

Re: [JSF-EXT] onclick doesn't trigger actionListeners

From: Ed Burns <ed.burns_at_sun.com>
Date: Mon, 16 Oct 2006 08:35:52 -0700

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

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

RK> 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();">

You mean for commandLink components, right? For regular buttons this
should not be a problem. I think you have found a real bug with respect
to the command link issue.

What version of the Sun JSF Impl are you using?

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

Can you try using a button instead of a link and let us know if it
works?

Ed

-- 
| ed.burns_at_sun.com  | {home: 407 869 9587, office: 408 884 9519 OR x31640}
| homepage:         | http://purl.oclc.org/NET/edburns/
| aim: edburns0sunw | iim: ed.burns_at_sun.com