Max Ischenko wrote:
> I have a EditWord servlet with a FunFormKit's form
> and a SubmitButton('_delete_', methodToInvoke='deleteWord') in it.
> When deleteWord method is called I do self.forward() to ConfirmPage
> to ask user for confirmation (with another simple "Yes/No" FFK form).
> I got the following error:
> File "ConfirmPage.py", line 17, in writeContent
> self.writePageForm()
> File "SitePage.py", line 211, in writePageForm
> formProcessed, data = self.processForm()
> File "FunFormKit/Form.py", line 145, in processForm
> method = getattr(self, actionMethod)
> AttributeError: ConfirmPage instance has no attribute 'deleteWord'
> Obviously FFK tries to process old form (from EditWord page) instead of
> current. How this could be fixed/solved?
After some debugging I found the cause of the error:
self.request().field('_formID_')) in ConfirmPage still points to
EditWord formID. Is this bug of FFK/Webware or it works as intended?
Currently I work-around this by adding
self.request().setField('_formID_', self.form().formID())
in ConfirmPage::writePageForm() before FormServlet::processForm is
called.
--
Regards, max.
|