z3c.formjs widgetselector customization

Simon Elbaz <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
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

_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.