[Zope3-Users] nextURL: add vs edit

Garanin Michael garanin at m-lan.ru
Fri Feb 17 14:03:21 EST 2006


Difference beetween AddView and EndView
1) for AddView: 'self.context' is view (name '+')
2) for EditView : 'self.context' is content-object

I think this is 'standart' behavior. Use 'zope.formlib' for advanced
customization your forms. 

В Птн, 17/02/2006 в 13:42 -0500, Shaun Cutts пишет:
> Ok,
> 
> In AddView.update,
> 
>         self.request.response.redirect(self.nextURL())
> 
> is called, but this is not called in EditView... so change isn't as
> simple as moving nextURL. However, if you put this line into
> EditView.update as well as moving nextURL, then my redirect works fine.
> 
> But does this break anything else? Is there some reason why the editview
> doesn't do redirect? 
> 
> I have gotten offlist feedback that I'm not the only one interested in
> this....
> 
> Thanks,
> - Shaun
> 
> -----Original Message-----
> From: zope3-users-bounces+shaun=cuttshome.net at zope.org
> [mailto:zope3-users-bounces+shaun=cuttshome.net at zope.org] On Behalf Of
> Shaun Cutts
> Sent: Friday, February 17, 2006 1:17 PM
> To: Zope3-users at zope.org
> Subject: [Zope3-Users] nextURL: add vs edit
> 
> Is there a reason why zope.app.form.browser.add.AddView defines:
> 
>     def nextURL(self):
>         return self.context.nextURL()
> 
> but zope.app.form.browser.editview.EditView doesn't?
> 
> My redirection works for add but not edit, and this is the reason. Is
> this a feature or a bug? If a bug, all that needs to happen is that
> nextURL get moved to EditView from AddView, as EditView is base for Add.
> 
> 
> But perhaps there is a reason for this I don't understand?
> 
> - Shaun
> 
> 
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users



More information about the Zope3-users mailing list