diff --git a/composer/schema/field.py b/composer/schema/field.py index 7f88b11..2e1f63e 100644 --- a/composer/schema/field.py +++ b/composer/schema/field.py @@ -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): diff --git a/composer/schema/interfaces.py b/composer/schema/interfaces.py index 6ed3551..8429aa3 100644 --- a/composer/schema/interfaces.py +++ b/composer/schema/interfaces.py @@ -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.