[BlueBream] redirecting URL from edit form

Joshua Immanuel joshua at hipro.co.in
Fri Jun 3 07:28:38 EDT 2011


Hello all,

Sorry for bothering again.

On Fri, 2011-06-03 at 15:13 +0530, Joshua Immanuel wrote:
> How to do the URL redirection in EditForm when the 'Apply' button is
> pressed?

In order to handle the redirection part I added a method as below

@form.action("Apply")
def apply_action(self, action, data):
	...
	self.request.response.redirect('.')

But in this method I have to call the form.applyData(..) and then I have
to notify zope for the ObjectModifiedEvent etc. Basically I am re-doing
the function of 'handle_edit_action' method in order to redirect the
page. I feel this is not the best way of doing it.

Is there any other better way of doing this?

Regards
-- 
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/bluebream/attachments/20110603/b5bc5941/attachment.bin 


More information about the bluebream mailing list