Re: [Repoze-dev] [Colander] Issue with colander.deferred - AttributeError: 'deferred' object has no attribute 'hidden'

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Josip Delic wrote:
> Am Dienstag, den 07.12.2010, 15:11 +0100 schrieb Andreas Jung:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>>
>> SOLVED - one must call explictly bind() on the schema in this case.
>>
>> Andreas
> 
> Hey Andreas,
> 
> you are using it with "five.pt" to add chameleon templates to zope2!?

Nope - just rendering the HTML form snippet from a browser view or even
a portal_skins script and throwing it into the main slot of Plone.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJM/kiyAAoJEADcfz7u4AZjmOELwM+o2CYdEKIq7sJvgtaX28F3
ONLwWcphaZN40Jg4yxQuHjG3VMgQkg53c8EyOx1BTckyYQiu2hZdPheKZU3KY2Lf
JLBtwIz7N7kG1kD4GuaHFbvxTKaogam/V2VEXr4sLQU3f0xunvG3jqKH601XNQZ5
Qk3sEUUZ+9AxMl45KqP7tNYC3l3cYVCXilyJAZuQiT/7gQnV0/kRpd9qokVEdyHZ
q8yabHbM6utyo35vC2G/9F8fiHiXGXXZVBWYu0UNTUA/NJLvC68krgtF930XxqYJ
lYo3Cu+kkqYZXFKwD8DRz7uQ6b4BGzjucIjgPeYgKGKraw1n7H5891HqYJ7YqDZR
1vvxt5W9PTCclWcbsORXN8LkMvhEDbG/FP+bvEmRNPKu2cGtNXunOqpTe/nopPVM
qGYyVajDrsHK2j8aH/aGSyhBoDgDI+iZCTutTtoPQiS4Rdz+OlZK7zfDGvGTDyZ8
EhaVewLbVfjj0Mrb9017WZXMJE7pqD0=
=VoWB
-END PGP SIGNATURE-
<>___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] [Colander] Issue with colander.deferred - AttributeError: 'deferred' object has no attribute 'hidden'

2010-12-07 Thread Josip Delic
Am Dienstag, den 07.12.2010, 15:11 +0100 schrieb Andreas Jung:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> 
> SOLVED - one must call explictly bind() on the schema in this case.
> 
> Andreas

Hey Andreas,

you are using it with "five.pt" to add chameleon templates to zope2!?

Josip

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] [Colander] Issue with colander.deferred - AttributeError: 'deferred' object has no attribute 'hidden'

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


SOLVED - one must call explictly bind() on the schema in this case.

Andreas

Andreas Jung wrote:
> Using Colander/Deform inside a Zope 2.11 using the following schema
> definition:
> 
> 
> 
> import deform
> import colander
> 
> @colander.deferred
> def selection_status(node, kw):
> values = kw.get('status', [])
> return deform.widget.SelectWidget(values=values)
> 
> class DefaultSchema(colander.MappingSchema):
> anrede = colander.SchemaNode(
> colander.String(),
> title=u'Anrede',
> widget=selection_status,
> view_roles = ['Recherche', 'Anonymous', 'Authenticated',
> 'AutorenFiBu', 'AutorenHOA'],
> edit_roles = ['AutorenFiBu'],
> edit_roles_on_creation = ['AutorenRed', 'AutorenFiBu'],
> )
> 
> 
> Rendering the template fails:
> 
> Traceback (innermost last):
> 
> Module ZPublisher.Publish, line 126, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 46, in call_object
> Module Shared.DC.Scripts.Bindings, line 316, in __call__
> Module Shared.DC.Scripts.Bindings, line 353, in _bindAndExec
> Module Products.CMFCore.FSPageTemplate, line 216, in _exec
> Module Products.CMFCore.FSPageTemplate, line 155, in pt_render
> Module Products.PageTemplates.PageTemplate, line 96, in pt_render
> Module zope.pagetemplate.pagetemplate, line 115, in pt_render
> Module zope.tal.talinterpreter, line 271, in __call__
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 910, in do_useMacro
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 539, in do_optTag_tal
> Module zope.tal.talinterpreter, line 524, in do_optTag
> Module zope.tal.talinterpreter, line 519, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 968, in do_defineSlot
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 764, in do_insertStructure_tal
> Module Products.PageTemplates.Expressions, line 223, in evaluateStructure
> Module zope.tales.tales, line 696, in evaluate
> URL:
> file:/local/HRS2/Devel/junga/hrs_trunk/parts/products-svn/AutorenDB2/skins/autorendb2/deform.xpt
> Line 17, Column 8
> Expression: 
> Names:
> {'container': ,
>  'context': ,
>  'default': ,
>  'here': ,
>  'loop': {},
>  'nothing': None,
>  'options': {'args': ()},
>  'repeat':  0x2aaab04224d0>,
>  'request': http://hdev:8080/Test/adb/deform>,
>  'root': ,
>  'template': ,
>  'user': }
> Module zope.tales.expressions, line 217, in __call__
> Module Products.PageTemplates.Expressions, line 163, in _eval
> Module Products.PageTemplates.Expressions, line 115, in render
> Module Products.PageTemplates.ZRPythonExpr, line 79, in call_with_ns
> Module Products.CMFCore.FSPythonScript, line 135, in
> __render_with_namespace__
> Module Shared.DC.Scripts.Bindings, line 330, in __render_with_namespace__
> Module Shared.DC.Scripts.Bindings, line 353, in _bindAndExec
> Module Products.CMFCore.FSPythonScript, line 196, in _exec
> Module None, line 25, in deform_prepare
> 
> Line 25
> Module deform.field, line 419, in render
> Module deform.field, line 394, in serialize
> Module deform.widget, line 791, in serialize
> Module deform.template, line 103, in __call__
> Module chameleon.core.template, line 103, in __call__
> Module chameleon.core.template, line 394, in render
> Module chameleon.zpt.template, line 17, in render
> Module chameleon.core.template, line 221, in render
> Module chameleon.core.template, line 373, in cook_and_render
> Module chameleon.core.template, line 209, in cook_and_render
> __traceback_info__: ( /local/HRS2/Devel/junga/hrs_trunk/eggs/deform-0.8-py2.4.egg/deform/templates/form.pt>,)
> Module chameleon_53e47ea76efd9f4bb68ebdb1440a64e2d2819387, line 307, in
> render
> Module deform.template, line 103, in __call__
> Module chameleon.core.template, line 103, in __call__
> Module chameleon.core.template, line 394, in render
> Module chameleon.zpt.template, line 17, in render
> Module chameleon.core.template, line 221, in render
> Module chameleon.core.template, line 373, in cook_and_render
> Module chameleon.core.template, line 209, in cook_and_render
> __traceback_info__: ( /local/HRS2/Devel/junga/hrs_trunk/eggs/deform-0.8-py2.4.egg/deform/templates/mapping_item.pt>,)
> Module chameleon_9a2a51e2a4e74828462e65a50a39b7df03fa54a4, line 213, in
> render
> Module deform.field, line 394, in serialize
> Module deform.widget, line 791, in serialize
> Module deform.template, line 103, in __call__
> Module chameleon.core.template, line 103, in __call__
> Module chameleon.core.template, line 394, in render
> Module chameleon.zpt.template, line 17, in render
> Module chameleon.core.template, line 221, in render
> Module chameleon.core.template, line 373, in cook_and_render
> Module chameleon.core.template, line 209, in cook_and_render
> __traceback_info__: (