View.dispatch -> View.render tls-sprint
authorsylvain.thenault@logilab.fr
Mon, 11 May 2009 11:55:10 +0200
branchtls-sprint
changeset 1723 30c3a713ab61
parent 1722 62f3fefb22f4
child 1725 d15406d17803
View.dispatch -> View.render
appobject.py
cwvreg.py
rtags.py
sobjects/notification.py
sobjects/supervising.py
sobjects/test/unittest_notification.py
sobjects/test/unittest_supervising.py
view.py
web/test/unittest_views_navigation.py
web/uicfg.py
web/views/autoform.py
web/views/basecontrollers.py
web/views/basetemplates.py
web/views/iprogress.py
web/views/navigation.py
web/views/primary.py
web/views/schema.py
web/views/startup.py
--- a/appobject.py	Mon May 11 11:30:42 2009 +0200
+++ b/appobject.py	Mon May 11 11:55:10 2009 +0200
@@ -194,7 +194,7 @@
             if __fallback_vid is None:
                 raise
             view = self.vreg.select_view(__fallback_vid, self.req, rset, **kwargs)
-        return view.dispatch(**kwargs)
+        return view.render(**kwargs)
 
     # url generation methods ##################################################
 
--- a/cwvreg.py	Mon May 11 11:30:42 2009 +0200
+++ b/cwvreg.py	Mon May 11 11:55:10 2009 +0200
@@ -189,7 +189,7 @@
         except KeyError:
             rset = None
         selected = self.select(objclss, req, rset, **context)
-        return selected.dispatch(**context)
+        return selected.render(**context)
 
     def main_template(self, req, oid='main-template', **context):
         """display query by calling the given template (default to main),
--- a/rtags.py	Mon May 11 11:30:42 2009 +0200
+++ b/rtags.py	Mon May 11 11:55:10 2009 +0200
@@ -63,7 +63,7 @@
         self._tagdefs[(str(rtype), tagged, stype, otype)] = tag
 
     def tag_attribute(self, stype, attr, tag):
-        self.tag_relation(stype, attr, '*', tag, tagged)
+        self.tag_relation(stype, attr, '*', tag, 'subject')
 
     def del_rtag(self, stype, rtype, otype):
         stype, otype, tagged = self._get_tagged(stype, otype)
--- a/sobjects/notification.py	Mon May 11 11:30:42 2009 +0200
+++ b/sobjects/notification.py	Mon May 11 11:55:10 2009 +0200
@@ -198,8 +198,9 @@
             # since the same view (eg self) may be called multiple time and we
             # need a fresh stream at each iteration, reset it explicitly
             self.w = None
-            # call dispatch before subject to set .row/.col attributes on the view :/
-            content = self.dispatch(row=0, col=0, **kwargs)
+            # XXX call render before subject to set .row/.col attributes on the
+            #     view
+            content = self.render(row=0, col=0, **kwargs)
             subject = self.subject()
             msg = format_mail(userdata, [emailaddr], content, subject,
                               config=self.config, msgid=msgid, references=refs)
--- a/sobjects/supervising.py	Mon May 11 11:30:42 2009 +0200
+++ b/sobjects/supervising.py	Mon May 11 11:55:10 2009 +0200
@@ -19,7 +19,7 @@
     events = ('before_add_relation', 'before_delete_relation',
               'after_add_entity', 'before_update_entity')
     accepts = ('Any',)
-    
+
     def call(self, session, *args):
         dest = self.config['supervising-addrs']
         if not dest: # no supervisors, don't do this for nothing...
@@ -27,24 +27,24 @@
         self.session = session
         if self._call(*args):
             SupervisionMailOp(session)
-        
+
     def _call(self, *args):
         if self._event() == 'update_entity' and args[0].e_schema == 'CWUser':
             updated = set(args[0].iterkeys())
             if not (updated - frozenset(('eid', 'modification_date', 'last_login_time'))):
-                # don't record last_login_time update which are done 
+                # don't record last_login_time update which are done
                 # automatically at login time
                 return False
         self.session.add_query_data('pendingchanges', (self._event(), args))
         return True
-        
+
     def _event(self):
         return self.event.split('_', 1)[1]
 
 
 class EntityDeleteHook(SomethingChangedHook):
     events = ('before_delete_entity',)
-    
+
     def _call(self, eid):
         entity = self.session.entity(eid)
         try:
@@ -80,19 +80,19 @@
                 changes.remove(change)
                 if entity.from_state:
                     try:
-                        changes.remove( ('delete_relation', 
-                                         (entity.wf_info_for[0].eid, 'in_state', 
+                        changes.remove( ('delete_relation',
+                                         (entity.wf_info_for[0].eid, 'in_state',
                                           entity.from_state[0].eid)) )
                     except ValueError:
                         pass
                     try:
-                        changes.remove( ('add_relation', 
-                                         (entity.wf_info_for[0].eid, 'in_state', 
+                        changes.remove( ('add_relation',
+                                         (entity.wf_info_for[0].eid, 'in_state',
                                           entity.to_state[0].eid)) )
                     except ValueError:
                         pass
                     event = 'change_state'
-                    change = (event, 
+                    change = (event,
                               (entity.wf_info_for[0],
                                entity.from_state[0], entity.to_state[0]))
                     changes.append(change)
@@ -115,7 +115,7 @@
                 #     at entity creation time
                 elif changedescr[1] == 'in_state' and changedescr[0] in added:
                     index['add_relation'].remove(change)
-                    
+
         except KeyError:
             break
     for eid in deleted:
@@ -146,10 +146,10 @@
 
     def recipients(self):
         return self.config['supervising-addrs']
-        
+
     def subject(self):
         return self.req._('[%s supervision] changes summary') % self.config.appid
-    
+
     def call(self, changes):
         user = self.req.actual_session().user
         self.w(self.req._('user %s has made the following change(s):\n\n')
@@ -163,30 +163,30 @@
         return {'eid': entity.eid,
                 'etype': entity.dc_type().lower(),
                 'title': entity.dc_title()}
-    
+
     def add_entity(self, entity):
         msg = self.req._('added %(etype)s #%(eid)s (%(title)s)')
         self.w(u'%s\n' % (msg % self._entity_context(entity)))
         self.w(u'  %s' % entity.absolute_url())
-            
+
     def update_entity(self, entity):
         msg = self.req._('updated %(etype)s #%(eid)s (%(title)s)')
         self.w(u'%s\n' % (msg % self._entity_context(entity)))
         # XXX print changes
         self.w(u'  %s' % entity.absolute_url())
-            
+
     def delete_entity(self, eid, etype, title):
         msg = self.req._('deleted %(etype)s #%(eid)s (%(title)s)')
         etype = display_name(self.req, etype).lower()
         self.w(msg % locals())
-        
+
     def change_state(self, entity, fromstate, tostate):
         msg = self.req._('changed state of %(etype)s #%(eid)s (%(title)s)')
         self.w(u'%s\n' % (msg % self._entity_context(entity)))
-        self.w(_('  from state %(fromstate)s to state %(tostate)s\n' % 
+        self.w(_('  from state %(fromstate)s to state %(tostate)s\n' %
                  {'fromstate': _(fromstate.name), 'tostate': _(tostate.name)}))
         self.w(u'  %s' % entity.absolute_url())
-        
+
     def _relation_context(self, fromeid, rtype, toeid):
         _ = self.req._
         session = self.req.actual_session()
@@ -202,7 +202,7 @@
                 'frometype': describe(fromeid),
                 'toeid': toeid,
                 'toetype': describe(toeid)}
-        
+
     def add_relation(self, fromeid, rtype, toeid):
         msg = self.req._('added relation %(rtype)s from %(frometype)s #%(fromeid)s to %(toetype)s #%(toeid)s')
         self.w(msg % self._relation_context(fromeid, rtype, toeid))
@@ -210,8 +210,8 @@
     def delete_relation(self, fromeid, rtype, toeid):
         msg = self.req._('deleted relation %(rtype)s from %(frometype)s #%(fromeid)s to %(toetype)s #%(toeid)s')
         self.w(msg % self._relation_context(fromeid, rtype, toeid))
-        
-                
+
+
 class SupervisionMailOp(SendMailOp):
     """special send email operation which should be done only once for a bunch
     of changes
@@ -219,14 +219,14 @@
     def _get_view(self):
         return self.session.vreg.select_component('supervision_notif',
                                                   self.session, None)
-        
+
     def _prepare_email(self):
         session = self.session
         config = session.vreg.config
         uinfo = {'email': config['sender-addr'],
                  'name': config['sender-name']}
         view = self._get_view()
-        content = view.dispatch(changes=session.query_data('pendingchanges'))
+        content = view.render(changes=session.query_data('pendingchanges'))
         recipients = view.recipients()
         msg = format_mail(uinfo, recipients, content, view.subject(), config=config)
         self.to_send = [(msg, recipients)]
--- a/sobjects/test/unittest_notification.py	Mon May 11 11:30:42 2009 +0200
+++ b/sobjects/test/unittest_notification.py	Mon May 11 11:55:10 2009 +0200
@@ -22,7 +22,7 @@
         self.failUnlessEqual(values['eid'], '21')
         self.failUnless('timestamp' in values)
         self.failUnlessEqual(parse_message_id(msgid1[1:-1], 'anotherapp'), None)
-        
+
     def test_notimestamp(self):
         msgid1 = construct_message_id('testapp', 21, False)
         msgid2 = construct_message_id('testapp', 21, False)
@@ -39,7 +39,7 @@
         for eid in (1, 12, 123, 1234):
             msgid1 = construct_message_id('testapp', eid, 12)
             self.assertNotEquals(msgid1, '<@testapp.%s>' % gethostname())
-        
+
 
 class RecipientsFinderTC(EnvBasedTC):
     def test(self):
@@ -57,19 +57,19 @@
         self.set_option('default-recipients-mode', 'default-dest-addrs')
         self.set_option('default-dest-addrs', 'abcd@logilab.fr, efgh@logilab.fr')
         self.assertEquals(finder.recipients(), [('abcd@logilab.fr', 'en'), ('efgh@logilab.fr', 'en')])
-        
+
 
 class StatusChangeViewsTC(EnvBasedTC):
-        
+
     def test_status_change_view(self):
         req = self.session()
         u = self.create_user('toto', req=req)
         assert u.req
         self.execute('SET X in_state S WHERE X eid %s, S name "deactivated"' % u.eid)
         v = self.vreg.select_view('notif_status_change', req, u.rset, row=0)
-        content = v.dispatch(row=0, comment='yeah',
-                             previous_state='activated',
-                             current_state='deactivated')
+        content = v.render(row=0, comment='yeah',
+                           previous_state='activated',
+                           current_state='deactivated')
         # remove date
         self.assertEquals(content,
                           '''
--- a/sobjects/test/unittest_supervising.py	Mon May 11 11:30:42 2009 +0200
+++ b/sobjects/test/unittest_supervising.py	Mon May 11 11:55:10 2009 +0200
@@ -17,12 +17,12 @@
         self.execute('SET C comments B WHERE B title "une autre news !", C content "Yo !"')
         self.vreg.config.global_set_option('supervising-addrs', 'test@logilab.fr')
 
-        
+
     def test_supervision(self):
         session = self.session()
         # do some modification
         ueid = self.execute('INSERT CWUser X: X login "toto", X upassword "sosafe", X in_group G, X in_state S '
-                            'WHERE G name "users", S name "activated"')[0][0]        
+                            'WHERE G name "users", S name "activated"')[0][0]
         self.execute('SET X last_login_time NOW WHERE X eid %(x)s', {'x': ueid}, 'x')
         self.execute('SET X in_state S WHERE X login "anon", S name "deactivated"')
         self.execute('DELETE Card B WHERE B title "une news !"')
@@ -38,7 +38,7 @@
         view = sentops[0]._get_view()
         self.assertEquals(view.recipients(), ['test@logilab.fr'])
         self.assertEquals(view.subject(), '[data supervision] changes summary')
-        data = view.dispatch(changes=session.query_data('pendingchanges')).strip()
+        data = view.render(changes=session.query_data('pendingchanges')).strip()
         data = re.sub('#\d+', '#EID', data)
         data = re.sub('/\d+', '/EID', data)
         self.assertTextEquals('''user admin has made the following change(s):
@@ -63,9 +63,9 @@
                               data)
         # check prepared email
         op._prepare_email()
-        self.assertEquals(len(op.to_send), 1) 
+        self.assertEquals(len(op.to_send), 1)
         self.assert_(op.to_send[0][0])
-        self.assertEquals(op.to_send[0][1], ['test@logilab.fr']) 
+        self.assertEquals(op.to_send[0][1], ['test@logilab.fr'])
 
     def test_nonregr1(self):
         session = self.session()
@@ -73,6 +73,6 @@
         self.execute('SET X last_login_time NOW WHERE X eid %(x)s', {'x': session.user.eid}, 'x')
         self.commit() # no crash
 
-        
+
 if __name__ == '__main__':
     unittest_main()
--- a/view.py	Mon May 11 11:30:42 2009 +0200
+++ b/view.py	Mon May 11 11:55:10 2009 +0200
@@ -125,7 +125,7 @@
 
     # main view interface #####################################################
 
-    def dispatch(self, w=None, **context):
+    def render(self, w=None, **context):
         """called to render a view object for a result set.
 
         This method is a dispatched to an actual method selected
@@ -150,6 +150,8 @@
         if stream is not None:
             return self._stream.getvalue()
 
+    dispatch = obsolete('.dispatch is deprecated, use .render')(render)
+
     # should default .call() method add a <div classs="section"> around each
     # rset item
     add_div_section = True
--- a/web/test/unittest_views_navigation.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/test/unittest_views_navigation.py	Mon May 11 11:55:10 2009 +0200
@@ -9,7 +9,7 @@
 BreadCrumbEntityVComponent.visible = True
 
 class NavigationTC(EnvBasedTC):
-    
+
     def test_navigation_selection(self):
         rset = self.execute('Any X,N WHERE X name N')
         req = self.request()
@@ -39,29 +39,29 @@
         req.set_search_state('W:X:Y:Z')
         navcomp = self.vreg.select_component('navigation', req, rset)
         self.assertIsInstance(navcomp, SortedNavigation)
-        
-        
+
+
     def test_sorted_navigation(self):
         rset = self.execute('Any X,N ORDERBY N WHERE X name N')
         req = self.request()
         req.set_search_state('W:X:Y:Z')
         navcomp = self.vreg.select_component('navigation', rset.req, rset)
-        html = navcomp.dispatch()
+        html = navcomp.render()
         rset = self.execute('Any RDEF ORDERBY RT WHERE RDEF relation_type RT')
         navcomp = self.vreg.select_component('navigation', req, rset)
-        html = navcomp.dispatch()
+        html = navcomp.render()
         rset = self.execute('Any RDEF ORDERBY RDEF WHERE RDEF relation_type RT')
         navcomp = self.vreg.select_component('navigation', req, rset)
-        html = navcomp.dispatch()
+        html = navcomp.render()
         rset = self.execute('CWAttribute RDEF ORDERBY RDEF')
         navcomp = self.vreg.select_component('navigation', req, rset)
-        html = navcomp.dispatch()
+        html = navcomp.render()
         rset = self.execute('Any RDEF ORDERBY N WHERE RDEF relation_type RT, RT name N')
         navcomp = self.vreg.select_component('navigation', req, rset)
-        html = navcomp.dispatch()
+        html = navcomp.render()
         rset = self.execute('Any N, COUNT(RDEF) GROUPBY N ORDERBY N WHERE RDEF relation_type RT, RT name N')
         navcomp = self.vreg.select_component('navigation', rset.req, rset)
-        html = navcomp.dispatch()
+        html = navcomp.render()
 
 
 
@@ -87,15 +87,15 @@
         req.cnx.commit()
         objs = self.vreg.possible_vobjects('contentnavigation', req, rset,
                                           view=view, context='navbottom')
-        
+
         clsids = [obj.id for obj in objs]
         self.failUnless('breadcrumbs' in clsids)
         objs = self.vreg.possible_vobjects('contentnavigation', req, rset,
                                           view=view, context='navtop')
-        
+
         clsids = [obj.id for obj in objs]
         self.failIf('breadcrumbs' in clsids)
-        
+
 
 if __name__ == '__main__':
     unittest_main()
--- a/web/uicfg.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/uicfg.py	Mon May 11 11:55:10 2009 +0200
@@ -34,10 +34,11 @@
         super(RDisplayRelationTags, self).__init__()
         self._counter = 0
 
-    def tag_relation(self, values, *args, **kwargs):
-        super(RDisplayRelationTags, self).tag_relation(values, *args, **kwargs)
-        if values:
-            values['order'] = self.get_timestamp()
+    def tag_relation(self, stype, rtype, otype, tag, tagged=None):
+        super(RDisplayRelationTags, self).tag_relation(stype, rtype, otype, tag,
+                                                       tagged)
+        if tag:
+            tag['order'] = self.get_timestamp()
 
     def get_timestamp(self):
         self._counter += 1
--- a/web/views/autoform.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/views/autoform.py	Mon May 11 11:55:10 2009 +0200
@@ -72,8 +72,8 @@
                             category = 'secondary'
                         else:
                             category = 'generic'
-                        cls.rcategories.tag_relation((X, rschema, Y, category,
-                                                      tagged=role)
+                        cls.rcategories.tag_relation(X, rschema, Y, category,
+                                                     tagged=role)
 
     @classmethod
     def erelations_by_category(cls, entity, categories=None, permission=None, rtags=None):
--- a/web/views/basecontrollers.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/views/basecontrollers.py	Mon May 11 11:55:10 2009 +0200
@@ -312,7 +312,7 @@
             view.pagination(req, rset, view.w, not view.need_navigation)
             if divid == 'pageContent':
                 stream.write(u'<div id="contentmain">')
-        view.dispatch()
+        view.render()
         extresources = req.html_headers.getvalue(skiphead=True)
         if extresources:
             stream.write(u'<div class="ajaxHtmlHead">\n') # XXX use a widget ?
@@ -349,7 +349,7 @@
             extraargs = dict((str(key), value)
                              for key, value in extraargs.items())
         extraargs = extraargs or {}
-        return comp.dispatch(**extraargs)
+        return comp.render(**extraargs)
 
     @check_pageid
     @xhtmlize
@@ -357,7 +357,7 @@
         view = self.vreg.select_view('inline-creation', self.req, None,
                                      etype=ttype, peid=peid, rtype=rtype,
                                      role=role)
-        return view.dispatch(etype=ttype, peid=peid, rtype=rtype, role=role)
+        return view.render(etype=ttype, peid=peid, rtype=rtype, role=role)
 
     @jsonize
     def js_validate_form(self, action, names, values):
--- a/web/views/basetemplates.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/views/basetemplates.py	Mon May 11 11:55:10 2009 +0200
@@ -89,7 +89,7 @@
             view.w(u'<?xml version="1.0"?>\n' + STRICT_DOCTYPE)
             view.w(u'<div xmlns="http://www.w3.org/1999/xhtml" xmlns:cubicweb="http://www.logilab.org/2008/cubicweb">')
         # have to replace our unicode stream using view's binary stream
-        view.dispatch()
+        view.render()
         if xhtml_wrap:
             view.w(u'</div>')
         self._stream = view._stream
@@ -115,13 +115,13 @@
         etypefilter = self.vreg.select_component('etypenavigation',
                                                  self.req, self.rset)
         if etypefilter and etypefilter.propval('visible'):
-            etypefilter.dispatch(w=w)
+            etypefilter.render(w=w)
         self.nav_html = UStringIO()
         if view and view.need_navigation:
             view.paginate(w=self.nav_html.write)
         w(_(self.nav_html.getvalue()))
         w(u'<div id="contentmain">\n')
-        view.dispatch(w=w)
+        view.render(w=w)
         w(u'</div>\n') # close id=contentmain
         w(_(self.nav_html.getvalue()))
         w(u'</div>\n') # closes id=pageContent
@@ -154,10 +154,10 @@
         w(u'<td id="contentcol">\n')
         rqlcomp = self.vreg.select_component('rqlinput', self.req, self.rset)
         if rqlcomp:
-            rqlcomp.dispatch(w=self.w, view=view)
+            rqlcomp.render(w=self.w, view=view)
         msgcomp = self.vreg.select_component('applmessages', self.req, self.rset)
         if msgcomp:
-            msgcomp.dispatch(w=self.w)
+            msgcomp.render(w=self.w)
         self.content_header(view)
 
     def template_footer(self, view=None):
@@ -174,7 +174,7 @@
         if boxes:
             self.w(u'<td class="navcol"><div class="navboxes">\n')
             for box in boxes:
-                box.dispatch(w=self.w, view=view)
+                box.render(w=self.w, view=view)
             self.w(u'</div></td>\n')
 
     def content_header(self, view=None):
@@ -199,7 +199,7 @@
         view = self.vreg.select_view('error', self.req, self.rset)
         self.template_header(self.content_type, view, self.req._('an error occured'),
                              [NOINDEX, NOFOLLOW])
-        view.dispatch(w=self.w)
+        view.render(w=self.w)
         self.template_footer(view)
 
     def template_header(self, content_type, view=None, page_title='', additional_headers=()):
@@ -243,7 +243,7 @@
         if boxes:
             w(u'<div class="navboxes">\n')
             for box in boxes:
-                box.dispatch(w=w)
+                box.render(w=w)
             self.w(u'</div>\n')
         w(u'</td>')
         w(u'<td id="contentcol" rowspan="2">')
@@ -255,7 +255,7 @@
     def topleft_header(self):
         self.w(u'<table id="header"><tr>\n')
         self.w(u'<td>')
-        self.vreg.select_component('logo', self.req, self.rset).dispatch(w=self.w)
+        self.vreg.select_component('logo', self.req, self.rset).render(w=self.w)
         self.w(u'</td>\n')
         self.w(u'</tr></table>\n')
 
@@ -322,25 +322,25 @@
         """build the top menu with authentification info and the rql box"""
         self.w(u'<table id="header"><tr>\n')
         self.w(u'<td id="firstcolumn">')
-        self.vreg.select_component('logo', self.req, self.rset).dispatch(w=self.w)
+        self.vreg.select_component('logo', self.req, self.rset).render(w=self.w)
         self.w(u'</td>\n')
         # appliname and breadcrumbs
         self.w(u'<td id="headtext">')
         comp = self.vreg.select_component('appliname', self.req, self.rset)
         if comp and comp.propval('visible'):
-            comp.dispatch(w=self.w)
+            comp.render(w=self.w)
         comp = self.vreg.select_component('breadcrumbs', self.req, self.rset, view=view)
         if comp and comp.propval('visible'):
-            comp.dispatch(w=self.w, view=view)
+            comp.render(w=self.w, view=view)
         self.w(u'</td>')
         # logged user and help
         self.w(u'<td>\n')
         comp = self.vreg.select_component('loggeduserlink', self.req, self.rset)
-        comp.dispatch(w=self.w)
+        comp.render(w=self.w)
         self.w(u'</td><td>')
         helpcomp = self.vreg.select_component('help', self.req, self.rset)
         if helpcomp: # may not be available if Card is not defined in the schema
-            helpcomp.dispatch(w=self.w)
+            helpcomp.render(w=self.w)
         self.w(u'</td>')
         # lastcolumn
         self.w(u'<td id="lastcolumn">')
@@ -399,7 +399,7 @@
         if components:
             self.w(u'<div id="contentheader">')
             for comp in components:
-                comp.dispatch(w=self.w, view=view)
+                comp.render(w=self.w, view=view)
             self.w(u'</div><div class="clear"></div>')
 
 
@@ -416,7 +416,7 @@
         if components:
             self.w(u'<div id="contentfooter">')
             for comp in components:
-                comp.dispatch(w=self.w, view=view)
+                comp.render(w=self.w, view=view)
             self.w(u'</div>')
 
 
--- a/web/views/iprogress.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/views/iprogress.py	Mon May 11 11:55:10 2009 +0200
@@ -32,7 +32,7 @@
 
     header_for_COLNAME methods allow to customize header's label
     """
-    
+
     id = 'progress_table_view'
     title = _('task progression')
     __select__ = implements(IMileStone)
@@ -87,7 +87,7 @@
     def header_for_milestone(self, ecls):
         """use entity's type as label"""
         return display_name(self.req, ecls.id)
-    
+
     def table_header(self, ecls):
         """builds the table's header"""
         self.w(u'<thead><tr>')
@@ -101,7 +101,7 @@
             self.w(u'<th>%s</th>' % html_escape(colname))
         self.w(u'</tr></thead>\n')
 
-    
+
     ## cell management ########################################################
     def build_project_cell(self, entity):
         """``project`` column cell renderer"""
@@ -117,7 +117,7 @@
     def build_state_cell(self, entity):
         """``state`` column cell renderer"""
         return html_escape(self.req._(entity.state))
-    
+
     def build_eta_date_cell(self, entity):
         """``eta_date`` column cell renderer"""
         if entity.finished():
@@ -152,7 +152,7 @@
         if costdescr:
             return u'%s (%s)' % (totalcost, ', '.join(costdescr))
         return unicode(totalcost)
-    
+
     def build_progress_cell(self, entity):
         """``progress`` column cell renderer"""
         progress =  u'<div class="progress_data">%s (%.2f%%)</div>' % (
@@ -165,7 +165,7 @@
     the ``project`` column
     """
     id = 'ic_progress_table_view'
-    
+
     def call(self):
         view = self.vreg.select_view('progress_table_view', self.req, self.rset)
         columns = list(view.columns)
@@ -173,7 +173,7 @@
             columns.remove('project')
         except ValueError:
             self.info('[ic_progress_table_view] could not remove project from columns')
-        view.dispatch(w=self.w, columns=columns)
+        view.render(w=self.w, columns=columns)
 
 
 class ProgressBarView(EntityView):
--- a/web/views/navigation.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/views/navigation.py	Mon May 11 11:55:10 2009 +0200
@@ -153,7 +153,7 @@
     if nav:
         # get boundaries before component rendering
         start, stop = nav.page_boundaries()
-        nav.dispatch(w=w)
+        nav.render(w=w)
         params = dict(req.form)
         nav.clean_params(params)
         # make a link to see them all
--- a/web/views/primary.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/views/primary.py	Mon May 11 11:55:10 2009 +0200
@@ -125,11 +125,11 @@
                                                 self.req, self.rset, row=self.row,
                                                 view=self, context=context):
             try:
-                comp.dispatch(w=self.w, row=self.row, view=self)
+                comp.render(w=self.w, row=self.row, view=self)
             except NotImplementedError:
                 warn('component %s doesnt implement cell_call, please update'
                      % comp.__class__, DeprecationWarning)
-                comp.dispatch(w=self.w, view=self)
+                comp.render(w=self.w, view=self)
         self.w(u'</div>')
 
     def render_entity_title(self, entity):
@@ -183,11 +183,11 @@
                 self.w(u'</div>')
             else:
                 try:
-                    box.dispatch(w=self.w, row=self.row)
+                    box.render(w=self.w, row=self.row)
                 except NotImplementedError:
                     # much probably a context insensitive box, which only implements
                     # .call() and not cell_call()
-                    box.dispatch(w=self.w)
+                    box.render(w=self.w)
 
     def _prepare_side_boxes(self, entity):
         sideboxes = []
--- a/web/views/schema.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/views/schema.py	Mon May 11 11:55:10 2009 +0200
@@ -62,7 +62,7 @@
     def render_entity_title(self, entity):
         self.w(u'<h1><span class="etype">%s</span> %s</h1>'
                % (entity.dc_type().capitalize(),
-                  html_escape(entity.dc_long_title()))
+                  html_escape(entity.dc_long_title())))
 
 
 class CWETypeOneLineView(baseviews.OneLineView):
--- a/web/views/startup.py	Mon May 11 11:30:42 2009 +0200
+++ b/web/views/startup.py	Mon May 11 11:55:10 2009 +0200
@@ -79,7 +79,7 @@
 
     def folders(self):
         self.w(u'<h4>%s</h4>\n' % self.req._('Browse by category'))
-        self.vreg.select_view('tree', self.req, None).dispatch(w=self.w)
+        self.vreg.select_view('tree', self.req, None).render(w=self.w)
 
     def startup_views(self):
         self.w(u'<h4>%s</h4>\n' % self.req._('Startup views'))