provide method for controlling which macro from which template will be used for rendering
This commit is contained in:
parent
a14c614fb3
commit
862b358254
2 changed files with 11 additions and 0 deletions
|
@ -199,6 +199,9 @@ class FieldInstance(object):
|
|||
self.errors.append(error)
|
||||
self.severity = max(error.severity, self.severity)
|
||||
|
||||
def getRenderer(self, name):
|
||||
return None
|
||||
|
||||
|
||||
class NumberFieldInstance(FieldInstance):
|
||||
|
||||
|
|
|
@ -278,6 +278,14 @@ class IFieldInstance(Interface):
|
|||
allow for checking more than one data element.
|
||||
"""
|
||||
|
||||
def getRenderer(name):
|
||||
""" Return the renderer object (e.g. a ZPT macro) for this field
|
||||
with the name given.
|
||||
|
||||
May return None in which case the calling application should
|
||||
use a default renderer.
|
||||
"""
|
||||
|
||||
|
||||
class IFormState(Interface):
|
||||
""" Represents the state of all fields when editing.
|
||||
|
|
Loading…
Add table
Reference in a new issue