[Kss-devel] How to manually render a view
Pawel Lewicki
lewicki at provider.pl
Tue Jul 3 13:13:51 CEST 2007
Hi,
I have a problem with kss html replacement using views. Is there a
simple python equivalent of
<tal:block tal:content="structure obj/@@kssworkflowviewlet"/>
?
I have a master page with a list of viewlets and use PloneKSSView to
rerender them.
I came so far to that code but it's not working.
-----code------
class KSSWorkflowView(PloneKSSView):
def workflowAction(self, uid, action):
core = self.getCommandSet('core')
at_tool = getToolByName(self.context, 'archetype_tool')
obj = at_tool.lookupObject(uid)
view = getMultiAdapter((obj, self.request),
name='kssworkflowviewlet')
content=view()
core.replaceInnerHTML('div#kssresult', content)
return self.render()
class KSSWorkflowViewlet(BrowserView):
def getActions(self):
return ['action1', 'action2']
------end-of-code------
I get "Unauthorized: You are not allowed to access 'getActions' in this
context" error while calling view().
Pawel Lewicki
More information about the Kss-devel
mailing list