From 6def865e88c5801c7d50b93adbce0f7da11570b2 Mon Sep 17 00:00:00 2001 From: helmutm Date: Tue, 12 May 2009 10:02:13 +0000 Subject: [PATCH] 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 --- concept.py | 2 +- layout/browser/base.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/concept.py b/concept.py index 4a6e518..7630b15 100644 --- a/concept.py +++ b/concept.py @@ -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): diff --git a/layout/browser/base.py b/layout/browser/base.py index 30fac0c..d930111 100644 --- a/layout/browser/base.py +++ b/layout/browser/base.py @@ -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: