Hi,
I found a code fragment in an example-application which enables a
View-Object to render a SourceText using a renderer of the user's choice.
class ViewClass(object):
def render(self):
entry_text = zapi.createObject(None,
self.context.renderer,
self.context.text)
view = zapi.getView(removeAllProxies(entry_text), '', self.request)
result = view.render()
context.renderer contains a token of the 'SourceTypes'-Vocabulary (i.e.
'zope.source.rest'), context.text is the text to be rendered. The 'result'
should be some
kind of html (xhtml preferred :-) ).
Zope Complains about this code, telling me, not to use zapi.getView() but
zapi.getMultiAdapter()
but there's no hint, what parameters to use for getMultiAdapter.
Does anyone know the correct getMultiAdapter()-line - maybe with an
explaination?
Thank you,
Frank
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users