[Zope-CVS] CVS: Products/CompositePage - composite.py:1.14 designuis.py:1.7 element.py:1.3 interfaces.py:1.9

Shane Hathaway shane at zope.com
Wed Mar 3 11:00:17 EST 2004


Update of /cvs-repository/Products/CompositePage
In directory cvs.zope.org:/tmp/cvs-serv3249

Modified Files:
	composite.py designuis.py element.py interfaces.py 
Log Message:
If no template is chosen, show the element anyway.

To support this, renamed getInlineTemplate() to queryInlineTemplate().
Previously, the UI showed the element with an error message.


=== Products/CompositePage/composite.py 1.13 => 1.14 ===
--- Products/CompositePage/composite.py:1.13	Tue Mar  2 18:40:46 2004
+++ Products/CompositePage/composite.py	Wed Mar  3 11:00:16 2004
@@ -225,7 +225,7 @@
                 templates = ()
                 try:
                     ob = element.dereference()
-                    template = element.getInlineTemplate()
+                    template = element.queryInlineTemplate()
                     templates = element.listAllowableInlineTemplates()
                 except:
                     error = formatException(self, editing=1)


=== Products/CompositePage/designuis.py 1.6 => 1.7 ===
--- Products/CompositePage/designuis.py:1.6	Tue Mar  2 18:40:46 2004
+++ Products/CompositePage/designuis.py	Wed Mar  3 11:00:16 2004
@@ -199,7 +199,7 @@
             ob = root.restrictedTraverse(path)
             obs.append(ob)
             assert ICompositeElement.isImplementedBy(ob)
-            m = guarded_getattr(ob, "getInlineTemplate")
+            m = guarded_getattr(ob, "queryInlineTemplate")
             template = m()
             if current is None:
                 current = template


=== Products/CompositePage/element.py 1.2 => 1.3 ===
--- Products/CompositePage/element.py:1.2	Tue Mar  2 18:40:46 2004
+++ Products/CompositePage/element.py	Wed Mar  3 11:00:16 2004
@@ -74,7 +74,7 @@
             return obj()
         return str(obj)
 
-    def getInlineTemplate(self):
+    def queryInlineTemplate(self):
         """Returns the name of the inline template this object uses.
         """
         return self.template_name


=== Products/CompositePage/interfaces.py 1.8 => 1.9 ===
--- Products/CompositePage/interfaces.py:1.8	Tue Mar  2 18:40:46 2004
+++ Products/CompositePage/interfaces.py	Wed Mar  3 11:00:16 2004
@@ -74,8 +74,10 @@
         """Returns a representation of this object as a string.
         """
 
-    def getInlineTemplate():
+    def queryInlineTemplate():
         """Returns the name of the inline template this object uses.
+
+        Returns None if none has been chosen and there is no default.
         """
 
     def setInlineTemplate(template):




More information about the Zope-CVS mailing list