[Grok-dev] ListSequenceWidget - How to change the sequence

Sascha Boch sascha.boch at gmx.de
Thu Jul 22 03:47:18 EDT 2010


Thanks, Christian. Sounds great, however... I get the following error:

File 
'/root/.buildout/eggs/Paste-1.7.2-py2.6.egg/paste/evalexception/middleware.py', 
line 306 in respond
  app_iter = self.application(environ, detect_start_response)
File 
'/root/.buildout/eggs/zope.app.wsgi-3.6.1-py2.6.egg/zope/app/wsgi/__init__.py', 
line 59 in __call__
  request = publish(request, handle_errors=handle_errors)
File 
'/root/.buildout/eggs/zope.publisher-3.12.3-py2.6.egg/zope/publisher/publish.py', 
line 134 in publish
  result = publication.callObject(request, obj)
File '/root/.buildout/eggs/grok-1.1.1-py2.6.egg/grok/publication.py', line 
89 in callObject
  return super(ZopePublicationSansProxy, self).callObject(request, ob)
File 
'/root/.buildout/eggs/zope.app.publication-3.10.2-py2.6.egg/zope/app/publication/zopepublication.py', 
line 205 in callObject
  return mapply(ob, request.getPositionalArguments(), request)
<changemgmt.app.ChangemgmtEditForm object at 0x373d890>
File 
'/root/.buildout/eggs/zope.publisher-3.12.3-py2.6.egg/zope/publisher/publish.py', 
line 109 in mapply
  return debug_call(obj, args)
File 
'/root/.buildout/eggs/zope.publisher-3.12.3-py2.6.egg/zope/publisher/publish.py', 
line 115 in debug_call
  return obj(*args)
File 
'/root/.buildout/eggs/grokcore.formlib-1.5-py2.6.egg/grokcore/formlib/components.py', 
line 90 in __call__
  self.update_form()
File 
'/root/.buildout/eggs/grokcore.formlib-1.5-py2.6.egg/grokcore/formlib/components.py', 
line 62 in update_form
  super(GrokForm, self).update()
File 
'/root/.buildout/eggs/zope.formlib-4.0-py2.6.egg/zope/formlib/form.py', 
line 746 in update
  self.setUpWidgets()
File 
'/root/.buildout/eggs/zope.formlib-4.0-py2.6.egg/zope/formlib/form.py', 
line 821 in setUpWidgets
  adapters=self.adapters, ignore_request=ignore_request
File 
'/root/.buildout/eggs/zope.formlib-4.0-py2.6.egg/zope/formlib/form.py', 
line 399 in setUpEditWidgets
  widget = _createWidget(form_field, field, request, iface)
File 
'/root/.buildout/eggs/zope.formlib-4.0-py2.6.egg/zope/formlib/form.py', 
line 331 in _createWidget
  return form_field.custom_widget(field, request)
File 
'/root/.buildout/eggs/zope.formlib-4.0-py2.6.egg/zope/formlib/widget.py', 
line 136 in __call__
  return self._create(args)
File 
'/root/.buildout/eggs/zope.formlib-4.0-py2.6.egg/zope/formlib/widget.py', 
line 118 in _create
  instance = self._widget_factory(*args)
TypeError: ListJsWidget() takes exactly 2 arguments (3 given)

Code: 

class FooEditForm(grok.EditForm):
    grok.context(Foo)
    grok.name('admin')
    
    form_fields = grok.AutoFields(Foo)
    object_widget = CustomWidgetFactory(ObjectWidget, FooField)
    dfe_widget = CustomWidgetFactory(ListJsWidget, 
subwidget=object_widget)

Any ideas? 

Regards,
Sascha
    
-- 
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.  
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20100722/b3500d53/attachment.html 


More information about the Grok-dev mailing list