Martin Margo wrote:
Hello
Sorry if this was asked before. I did some basic search and couldn't
find anything. I am new to Zope3 myself.
After reading Stephan and Von Weitershausen's book on Zope 3, I begin
building my own web application. My question is :
After my user adds a new custom object (type CandyBar) through
http://<site>/+/AddCandyBar.html=, how do I redirect the user to a
custom view (the custom view is called
browser/CandyBarPurchaseConfirm.pt)?
Do you use browser:addform of the form framework?
If so, you have to provide your own view class overwriting the nextURL
method. Be careful your view is used for the adaption of '+' (the adding
view of the container). Therefore the self.context is referencing the
'+' and the self.context.context the underlying container:
class AddView(object):
def nextURL(self):
return zapi.absoluteURL(self.context.context, self.request) +
'/@@anyurl.html'
<browser:addform
class="module.AddView"
...
/>
Regards,
Dominik
begin:vcard
fn:Dominik Huber
n:Huber;Dominik
email;internet:[EMAIL PROTECTED]
tel;work:++41 56 534 77 30
x-mozilla-html:FALSE
version:2.1
end:vcard
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users