Hello,
I'm working with CPS 3.4 and I'm using compound widgets. When a widget that is inside a compound widget should be hidden, this error occurs:
######################################################
2006-04-27 09:56:56 ERROR Zope.SiteErrorLog http://10.207.248.60:4000/bpi_des/cpsdirectory_entry_view
Traceback (most recent call last):
File "/opt/zope2.9/lib/python/ZPublisher/Publish.py", line 114, in publish
request, bind=1)
File "/opt/zope2.9/lib/python/ZPublisher/mapply.py", line 88, in mapply
if debug is not None: return debug(object,args,context)
File "/opt/zope2.9/lib/python/ZPublisher/Publish.py", line 40, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
File "/opt/zope2.9/lib/python/Shared/DC/Scripts/Bindings.py", line 311, in __call__
return self._bindAndExec(args, kw, None)
File "/opt/zope2.9/lib/python/Shared/DC/Scripts/Bindings.py", line 348, in _bindAndExec
return self._exec(bound_data, args, kw)
File "/root/instances/zope2.9/innovaDes/Products/CMFCore/FSPageTemplate.py", line 195, in _exec
result = self.pt_render(extra_context=bound_names)
File "/root/instances/zope2.9/innovaDes/Products/CMFCore/FSPageTemplate.py", line 134, in pt_render
result = FSPageTemplate.inheritedAttribute('pt_render')(
File "/opt/zope2.9/lib/python/Products/PageTemplates/PageTemplate.py", line 104, in pt_render
tal=not source, strictinsert=0)()
File "/opt/zope2.9/lib/python/TAL/TALInterpreter.py", line 238, in __call__
self.interpret(self.program)
File "/opt/zope2.9/lib/python/TAL/TALInterpreter.py", line 281, in interpret
handlers[opcode](self, args)
File "/opt/zope2.9/lib/python/TAL/TALInterpreter.py", line 507, in do_setLocal_tal
self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "/opt/zope2.9/lib/python/Products/PageTemplates/TALES.py", line 221, in evaluate
return expression(self)
File "/opt/zope2.9/lib/python/Products/PageTemplates/ZRPythonExpr.py", line 47, in __call__
return eval(code, g, {})
File "Python expression "dir.renderEntryDetailed(id)"", line 1, in <expression>
File "/root/instances/zope2.9/innovaDes/Products/CPSDirectory/BaseDirectory.py", line 562, in renderEntryDetailed
layout_mode=layout_mode, **kw)
File "/root/instances/zope2.9/innovaDes/Products/CPSDirectory/BaseDirectory.py", line 932, in _renderLayout
layout.renderLayoutStructure(layout_structure, datastructure, **kw)
File "/root/instances/zope2.9/innovaDes/Products/CPSSchemas/Layout.py", line 391, in renderLayoutStructure
widget_infos=widget_infos, **kw)
File "/root/instances/zope2.9/innovaDes/Products/CPSSchemas/BasicWidgets.py", line 2030, in render
rendered = widget.render(widget_mode, datastructure, **kw)
File "/root/instances/zope2.9/innovaDes/Products/CPSSchemas/BasicWidgets.py", line 2030, in render
rendered = widget.render(widget_mode, datastructure, **kw)
File "/root/instances/zope2.9/innovaDes/Products/CPSSchemas/BasicWidgets.py", line 295, in render
raise RuntimeError('unknown mode %s' % mode)
RuntimeError: unknown mode hidden
#################################################################
I have found the code in BasicWidgets.py, but in these classes I can't find an example of how hidden mode is handled in other cases. So I think this is controled before the call to render the widget.
The question is, where should I control to avoid the widget get rendered if the mode is hidden?
I wouldn't like to modify BasicWidgets.py because in that case my product would depend on a customized CPSSchemas.
Thank you very much.
JoseLuis de la Rosa Triviño
Becario Área de Sistemas de Información
FUNDACIÓN IAVANTE
joseluis.rosa at iavantefundacion.com
Tel. 951 015 300
Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.
This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nuxeo.com/pipermail/cps-devel/attachments/20060427/b757abcc/attachment.htm
Hosting: Nuxeo: Zope service provider