[Zope3-Users] nextURL not working as expected

Florian Lindner mailinglists at xgm.de
Mon Aug 7 10:03:53 EDT 2006

I habe a view class derived from zope.formlib.form.AddForm:

class AddLink(form.AddForm):
    form_fields = form.fields(ILink)
    def createAndAdd(self, data):
        self.link = Link()
        self.link.title = data['title']
        self.link.description = data['description']
        self.link.URL = data['URL']
        self.context[data["title"]] = self.link
        return self.link
    def nextURL(self):
        return absoluteURL(self.link, self.request)

The view is registered for "zope.app.container.interfaces.IAdding"

After I have added the object I except to be redirected to the URL returned in 
nextURL. Instead I am always redirected to the add form again. It seems that 
nextURL is not even called. Why?



More information about the Zope3-users mailing list