Alek Kowalczyk <[EMAIL PROTECTED]> writes: > > I found that when submitting "Save" action (i.e exit from Input Mode), > then in the FormBase.validate(self, action, data) function > self.widgets contains: > (a) "Input" versions of my widgets if the handler decorator is > <at> parentAction > (b) "Display" versions of my widgets if the handler decorator is > <at> itemAction > Because of that, in (b) case the FormBase.validate code (below) does not load > data with the values supplied by user. > return (getWidgetsData(self.widgets, self.prefix, data) > + checkInvariants(self.form_fields, data)) > > But still not sure if it is a bug, or I just use itemAction incorrectly. > > Regards! > Alek. >
I found where the bug is. It is in MultiFormBase.checkInputModeAction in the line marked with three stars. There is a missing '.' between item key and action name def checkInputModeAction(self, action): if interfaces.IItemAction.providedBy(action): for key in self.forms: *** name = self.prefix + '.sf.' + key + action.__name__ if name in self.request.form: return action.inputMode if interfaces.IParentAction.providedBy(action): name = self.prefix + '.' + action.__name__ if name in self.request.form: return action.inputMode return None The line should be changed to: name = self.prefix + '.sf.' + key + '.' + action.__name__ _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users