Hi,
  I have a view class like this:

class EditTestPage(form.EditForm):
   form_fields = form.Fields(ITestPage)
   template = namedtemplate.NamedTemplate('page_edit')
   output = ""

   actions = form.Actions(
       form.Action('Save', success='handle_save_action'),
       form.Action('Preview', success='handle_preview_action'),
       )

   def handle_save_action(self, action, data):
       if form.applyChanges(self.context, self.form_fields, data):
           self.status = 'Object updated'
       else:
           self.status = 'No changes'
       self.request.response.redirect('.')

   def handle_preview_action(self, action, data):
       print "Test"
       self.output = "Test"

When I click 'Preview' or 'Save' button, the actions are called two times, any idea ?

Regards,
Baiju M

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to