add getMessage() method for standardized message handling in forms

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3379 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2009-05-12 10:02:13 +00:00
parent 1a47ac9182
commit 6def865e88
2 changed files with 4 additions and 1 deletions

View file

@ -409,7 +409,7 @@ class IndexAttributes(object):
@Lazy
def adaptedIndexAttributes(self):
if self.adapted != self.context:
return component.queryAdapter(self.adapted, IIndexAttributes)
#return component.queryAdapter(self.adapted, IIndexAttributes)
return IIndexAttributes(self.adapted, None)
def text(self):

View file

@ -121,6 +121,9 @@ class BaseView(object):
for p in packages:
requirements.add(p)
def getMessage(self, id):
return self.request.form.get('loops.messages').get(id, {})
def renderText(self, text, contentType):
typeKey = util.renderingFactories.get(contentType, None)
if typeKey is None: