entity.py
branchtls-sprint
changeset 1715 cba9f175da2d
parent 1582 67a86c70e42e
child 1721 694f6a50e138
--- a/entity.py	Thu May 07 16:33:22 2009 +0200
+++ b/entity.py	Thu May 07 16:42:34 2009 +0200
@@ -51,11 +51,11 @@
     def _dispatch_rtags(tags, rtype, role, stype, otype):
         for tag in tags:
             if tag in _MODE_TAGS:
-                uicfg.rmode.set_rtag(tag, rtype, role, stype, otype)
+                uicfg.rmode.tag_relation(tag, (stype, rtype, otype), role)
             elif tag in _CATEGORY_TAGS:
-                uicfg.rcategories.set_rtag(tag, rtype, role, stype, otype)
+                uicfg.rcategories.tag_relation(tag, (stype, rtype, otype), role)
             elif tag == 'inlineview':
-                uicfg.rinlined.set_rtag(True, rtype, role, stype, otype)
+                uicfg.rinlined.tag_relation(True, (stype, rtype, otype), role)
             else:
                 raise ValueError(tag)
 
@@ -127,7 +127,9 @@
                     if wdgname == 'StringWidget':
                         wdgname = 'TextInput'
                     widget = getattr(formwidgets, wdgname)
-                    AutomaticEntityForm.rwidgets.set_rtag(wdgname, rtype, 'subject', etype)
+                    assert hasattr(widget, 'render')
+                    AutomaticEntityForm.rwidgets.tag_relation(
+                        widget, (etype, rtype, '*'), 'subject')
         return super(_metaentity, mcs).__new__(mcs, name, bases, classdict)