[Zope-dev] z3c.formjs widgetselector customization
Simon Elbaz
elbazsimon9 at gmail.com
Tue Feb 15 12:08:06 EST 2011
Hi,
I use z3c.formjs in a project and would like to customize the selector id
used into jsaction.handler for form field.
Since the z3c.formui templates add "-row" suffix to the widget id, I need
also to add the "-row" suffix to the selector id in the event handler.
Here is the code in jsaction.py:
# Step 1: Get the handler.
handlers = widget.form.jshandlers.getHandlers(widget.field)
# Step 2: Create a selector.
selector_cls = queryUtility(interfaces.IWidgetSelector)
if selector_cls is None:
selector = WidgetSelector(widget)
else:
selector = selector_cls(widget)
If it is a good idea, how could I apply it to svn repository ?
Thx,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope-dev/attachments/20110215/056910f7/attachment.html
More information about the Zope-Dev
mailing list