<br><br><div><span class="gmail_quote">On 4/19/07, <b class="gmail_sendername">Marius Gedminas</b> <<a href="mailto:mgedmin@b4net.lt">mgedmin@b4net.lt</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thu, Apr 19, 2007 at 11:20:07AM +0200, Aleksander Kowalczyk wrote:<br>> I think I have similar problem with action renderer: I would like to attach<br>> a javascript handler for my action button.<br>> Unfortunately the renderer seems to not allow to pass any additional
<br>> attributes for the html button (like onclick attribute).<br><br>Yes. I recently needed to add a CSS class to an action button (in Zope<br>3.2 -- there's no time to port to 3.3/3.4 because Customers Demand<br>
Features). In the end I subclassed zope.formlib.form.Action and made<br>render a regular method that did what I wanted it to do.<br><br>> Leonardo,<br>> you mentioned about overriding the renderer adapter. This could also solve
<br>> my problem, if possible. How to do that?<br><br>Reading zope/formlib/namedtemplate.txt might help. You either have to<br>use ZCML overrides, or subclass zope.formlib.form.Action (or<br>attach marker interfaces to its instances, although that might not work
<br>given its copy-on-__get__ descriptorish behaviour).<br></blockquote><div><br>Can I somehow override this directive (from formlib/configure.zcml) in my instance's etc/overrides.zcml ? <span class="q"><br> <adapter factory=".form.render_submit_button" name="render" />
<br><br clear="all"></span>I think I asked about similar thing some time ago - and the response I received was "no"...<br>
<br>Regards!<br>Alek </div><br><br></div><br clear="all"><br>-- <br>_____________<br>Alek Kowalczyk<br><a href="http://iblog.blox.pl">http://iblog.blox.pl</a>