Affects Version/s: 1.2
Fix Version/s: 1.0
Operating System: All
There is still the following outstanding issue related to onclick:
CommandLinkRenderer, if the attribute already has a value, prepend our script to
the existing value. I'm not sure if the renderkits already works that way?
onClick="injectedScript(); alert('Developer debugging');"
The tricky thing is making sure that you preserve semantics
of their callback, especially w.r.t to the return value.
This commandButton case is actually fairly straightforward here;
prepending this script would work fine. But commandLink
would be trickier, since you'd really want to prepend the user's
script, and only call the built-in onclick if the user's
script does not return false. This takes some fancy footwork
The following code would allow injection of JSF code next to the User code no
matter if they defined a return type or not.
return (a()==false) ? false : b();