Viele Felder mit deforms

Vladislav Vorobiev <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
Hallo,

wenn ich viele Felder mit deform darstellen möchte (ab 20) bekomme ich
ein Fehler:

  Module zope.tales.tales, line 696, in evaluate
   - URL: /home/p27b/var/zeoi1/Products/VVshop/browser/deform_test.pt
   - Line 20, Column 0
   - Expression: <PathExpr standard:u'view/form_view'>
   - Names:
      {'args': (),
       'context': <Shop at /kundenseiten/gossrushop/shop>,
       'default': <object object at 0x7f44f412ab40>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': <HTTPRequest,
URL=http://check.gossrushop.vavmaster.de/test_deform>,
       'template':
<zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at
0x71fd8d0>,
       'view': <Products.Five.metaclass.DEformTest object at 0x736c210>,
       'views': <zope.browserpage.viewpagetemplatefile.ViewMapper
object at 0x7365ed0>}
  Module zope.tales.expressions, line 217, in __call__
  Module zope.tales.expressions, line 211, in _eval
  Module Products.VVshop.browser.browser_deform, line 379, in form_view
  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 104, in __call__
  Module chameleon.core.template, line 402, in render
  Module chameleon.zpt.template, line 17, in render
  Module chameleon.core.template, line 229, in render
  Module chameleon.core.template, line 382, in cook_and_render
  Module chameleon.core.template, line 217, in cook_and_render
   - __traceback_info__: (<PageTemplateFile
/home/p27b/usr/lib/python2.7/site-packages/deform-0.9-py2.7.egg/deform/templates/form.pt>,)
  Module chameleon_2d8479fcee0b551658723a3d1c0b78c852200efc, line 307, in render
  Module deform.template, line 103, in __call__
  Module chameleon.core.template, line 104, in __call__
  Module chameleon.core.template, line 402, in render
  Module chameleon.zpt.template, line 17, in render
  Module chameleon.core.template, line 229, in render
  Module chameleon.core.template, line 382, in cook_and_render
  Module chameleon.core.template, line 217, in cook_and_render
   - __traceback_info__: (<PageTemplateFile
/home/p27b/usr/lib/python2.7/site-packages/deform-0.9-py2.7.egg/deform/templates/mapping_item.pt>,)
  Module chameleon_86609e67614644096f5b299250421c97eec7612e, line 213, in render
  Module deform.field, line 394, in serialize
  Module deform.widget, line 937, in serialize
RuntimeError: Caught exception rendering template.
 - Expression: ``rndr(tmpl,field=f,cstruct=cstruct.get(f.name, null))``
 - Filename:   /home/p27b/usr/lib/python2.7/site-packages/deform-0.9-py2.7.egg/deform/templates/form.pt
 - Arguments:  field: <Form - at 0x736c6d0>
               cstruct: {...} (60)
               template: <PageTemplateFile - at 0x7372710>
               xincludes: <XIncludes - at 0x7372790>
               macros: <Macros - at 0x7a7d250>
               null: <_null - at 0x70a6ed0>

RuntimeError: Caught exception rendering template.
 - Expression: ``field.serialize(cstruct)``
 - Filename:   /home/p27b/usr/lib/python2.7/site-packages/deform-0.9-py2.7.egg/deform/templates/mapping_item.pt
 - Arguments:  field: <Field - at 0x736cc50>
               cstruct: <_null - at 0x70a6ed0>
               template: <PageTemplateFile - at 0x7a7db50>
               xincludes: <XIncludes - at 0x7a89910>
               macros: <Macros - at 0x7a89290>

IndexError: list index out of range

Vieleicht hat jemand sowas schon mal gesehen.

Der code sieht so  aus:

class MySchema(MappingSchema):

    name = SchemaNode(String(),
                      description = LONG_DESC)
    title = SchemaNode(String(),
                      description = LONG_DESC)
    root = SchemaNode(String(),
                      description = LONG_DESC)
   .....viele viele felde


......
class DEformTest(BrowserPage):
    def form_view(obj):
        myform = Form(schema, buttons=('submit','clear'))
        return myform.render()
    __call__ = ViewPageTemplateFile('deform_test.pt')


Mit wenigen Feldern funktioniert es.

-- 
Best Regards
Vlad Vorobiev


_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.