view is optional tls-sprint
authorsylvain.thenault@logilab.fr
Fri, 20 Feb 2009 01:15:37 +0100
branchtls-sprint
changeset 880 d46cf89ead07
parent 879 329fd038c5a3
child 881 18e6c8db7bc5
view is optional
web/component.py
--- a/web/component.py	Fri Feb 20 01:15:20 2009 +0100
+++ b/web/component.py	Fri Feb 20 01:15:37 2009 +0100
@@ -52,10 +52,10 @@
     
     context = 'navcontentbottom' # 'footer' | 'header' | 'incontext'
     
-    def call(self, view):
+    def call(self, view=None):
         return self.cell_call(0, 0, view)
 
-    def cell_call(self, row, col, view):
+    def cell_call(self, row, col, view=None):
         raise NotImplementedError()
 
     
@@ -142,8 +142,9 @@
 
 class RelatedObjectsVComponent(EntityVComponent):
     """a section to display some related entities"""
+    __select__ = partial_relation_possible() & partial_has_related_entities()
+    
     vid = 'list'
-    __select__ = partial_relation_possible() & partial_has_related_entities()
     
     def rql(self):
         """override this method if you want to use a custom rql query"""