[BlueBream] getting size of zope.schema.List from a view in bluebream
josh at hipro.co.in
Tue Aug 23 03:46:24 EDT 2011
While trying to get the length of zope.schema.List field in a view
(like this: len(self.context.list_field) I get the following error
ForbiddenAttribute: ('__len__', )
Even though my zcml configuration for that class is defined as below
I still get the above error. To circumvent this issue, I added a method
in the interface like say 'getListSize()' which has the following
name = u''
list_field = PersistentList()
This solves my issue. However, I am curious to know whether is this the
only solution available to the above issue. Am I going in the right
Please guide me.
HiPro IT Solutions Private Limited
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/bluebream/attachments/20110823/066257ed/attachment.bin
More information about the bluebream