[Zope3-Users] vary formlib render_submit_button by skin

Aleksander Kowalczyk thealx at poczta.onet.pl
Thu Apr 19 08:26:45 EDT 2007


On 4/19/07, Marius Gedminas <mgedmin at b4net.lt> wrote:
>
> On Thu, Apr 19, 2007 at 11:20:07AM +0200, Aleksander Kowalczyk wrote:
> > I think I have similar problem with action renderer: I would like to
> attach
> > a javascript handler for my action button.
> > Unfortunately the renderer seems to not allow to pass any additional
> > attributes for the html button (like onclick attribute).
>
> Yes.  I recently needed to add a CSS class to an action button (in Zope
> 3.2 -- there's no time to port to 3.3/3.4 because Customers Demand
> Features).  In the end I subclassed zope.formlib.form.Action and made
> render a regular method that did what I wanted it to do.
>
> > Leonardo,
> > you mentioned about overriding the renderer adapter. This could also
> solve
> > my problem, if possible. How to do that?
>
> Reading zope/formlib/namedtemplate.txt might help.  You either have to
> use ZCML overrides, or subclass zope.formlib.form.Action (or
> attach marker interfaces to its instances, although that might not work
> given its copy-on-__get__ descriptorish behaviour).
>

Can I somehow override this directive (from formlib/configure.zcml) in my
instance's etc/overrides.zcml ?
  <adapter factory=".form.render_submit_button" name="render" />

I think I asked about similar thing some time ago - and the response I
received was "no"...

Regards!
Alek




-- 
_____________
Alek Kowalczyk
http://iblog.blox.pl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20070419/6ff61a69/attachment.htm


More information about the Zope3-users mailing list