[Zope-CMF] Customizing worklists with Zclasses

S Haldar shaldar11@yahoo.com
Mon, 1 Jul 2002 09:01:04 -0700 (PDT)


Hi all - 
I want to customize the worklist shown by DC Workflow
to list the the entries from Zclass instances. 

The Zclass has properties in the propertysheets that I
want to be able to display in the list. The ZClass
models information about a customer - and I am
capturing the customer address (Name, Street, City,
State, Zip code) as properties in a propertysheet
called tbProperties. 
I am not able to do this. 

I modified the TAL script given for the worklist URL.
It is called portal_skins->zpt_generic->search.

to display the name for each customer I used:
       
"python:results.propertysheets.tbProperties.getProperty('Customer_name')"

Where  "Customer_name" is name of a property  in the
Zclass instances being tracked by "results".
tbProperties is the name of the propertysheet.

This Zclass is inherited from CatalogAware,
PortalContent and DefaultDublinCoreImpl classes.

I get the following error when I view the worklist:

================================
Site Error
An error was encountered while publishing this
resource. 

TALESError

Sorry, a site error occurred.

Traceback (innermost last):
  File C:\Program
Files\WebSite\lib\python\ZPublisher\Publish.py, line
150, in publish_module
  File C:\Program
Files\WebSite\lib\python\ZPublisher\Publish.py, line
114, in publish
  File C:\Program
Files\WebSite\lib\python\Zope\__init__.py, line 158,
in zpublisher_exception_hook
    (Object: Test_Portal)
  File C:\Program
Files\WebSite\lib\python\ZPublisher\Publish.py, line
98, in publish
  File C:\Program
Files\WebSite\lib\python\ZPublisher\mapply.py, line
88, in mapply
    (Object: searchAlt)
  File C:\Program
Files\WebSite\lib\python\ZPublisher\Publish.py, line
39, in call_object
    (Object: searchAlt)
  File C:\Program
Files\WebSite\lib\python\Shared\DC\Scripts\Bindings.py,
line 252, in __call__
    (Object: searchAlt)
  File C:\Program
Files\WebSite\lib\python\Shared\DC\Scripts\Bindings.py,
line 283, in _bindAndExec
    (Object: searchAlt)
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
232, in __call__
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
265, in interpret
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
620, in do_useMacro
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
265, in interpret
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
643, in do_defineSlot
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
265, in interpret
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
591, in do_condition
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
265, in interpret
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
576, in do_loop_tal
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
265, in interpret
  File C:\Program
Files\WebSite\lib\python\TAL\TALInterpreter.py, line
502, in do_setLocal_tal
  File C:\Program
Files\WebSite\lib\python\Products\PageTemplates\TALES.py,
line 295, in evaluate
  File C:\Program
Files\WebSite\lib\python\Products\PageTemplates\ZRPythonExpr.py,
line 121, in __call__
    (Info:
results.propertysheets.tbProperties.getProperty('City'))
  File Python expression
"results.propertysheets.tbProperties.getProperty('City')",
line 2, in f
  File C:\Program
Files\WebSite\lib\python\AccessControl\ZopeGuards.py,
line 47, in guarded_getattr
TALESError: Sorry, an error occurred
=================================================



Is there any way to get around this ZopeGuards error
and get the customer information listetd in the
worklist? I don't get an error when I try to list the
worklist items without any information from the
propertysheets - but I need that information to be
listed.
An urgent response is needed and will be very much
appreciated.

Best regards - Susmit






__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com