

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
37 messages in net.sourceforge.lists.plone-developersRe: CMFFormController should abort th...| From | Sent On | Attachments |
|---|---|---|
| Dorneles Treméa | Nov 9, 2007 3:17 pm | |
| Philipp von Weitershausen | Nov 10, 2007 7:07 am | |
| Dorneles Treméa | Nov 10, 2007 7:58 am | |
| Wichert Akkerman | Nov 10, 2007 12:22 pm | |
| Martin Aspeli | Nov 10, 2007 2:12 pm | |
| Wichert Akkerman | Nov 10, 2007 4:20 pm | |
| Philipp von Weitershausen | Nov 11, 2007 1:32 am | |
| Dorneles Treméa | Nov 11, 2007 5:19 pm | |
| Alan Runyan | Nov 11, 2007 5:20 pm | |
| Martin Aspeli | Nov 11, 2007 5:44 pm | |
| Martin Aspeli | Nov 11, 2007 5:51 pm | |
| Wichert Akkerman | Nov 12, 2007 4:37 am | |
| Sidnei da Silva | Nov 12, 2007 4:43 am | |
| Daniel Kraft | Nov 12, 2007 5:40 am | |
| Martin Aspeli | Nov 12, 2007 5:52 am | |
| Dorneles Treméa | Nov 12, 2007 9:35 am | |
| Wichert Akkerman | Nov 12, 2007 9:56 am | |
| Martin Aspeli | Nov 12, 2007 9:59 am | |
| Martin Aspeli | Nov 12, 2007 10:00 am | |
| Dorneles Treméa | Nov 12, 2007 10:56 am | |
| Martin Aspeli | Nov 12, 2007 11:14 am | |
| Martin Aspeli | Nov 12, 2007 11:21 am | |
| Wichert Akkerman | Nov 12, 2007 11:36 am | |
| Martin Aspeli | Nov 12, 2007 11:41 am | |
| Sidnei da Silva | Nov 12, 2007 11:47 am | |
| Martin Aspeli | Nov 12, 2007 12:04 pm | |
| Dorneles Treméa | Nov 12, 2007 12:28 pm | |
| Dorneles Treméa | Nov 12, 2007 12:34 pm | |
| Dorneles Treméa | Nov 12, 2007 1:29 pm | |
| Wichert Akkerman | Nov 12, 2007 1:32 pm | |
| Martin Aspeli | Nov 12, 2007 1:41 pm | |
| Dorneles Treméa | Nov 12, 2007 1:44 pm | |
| Martin Aspeli | Nov 12, 2007 1:46 pm | |
| Wichert Akkerman | Nov 12, 2007 1:46 pm | |
| Martin Aspeli | Nov 12, 2007 1:47 pm | |
| Dorneles Treméa | Nov 12, 2007 5:11 pm | |
| Daniel Nouri | Nov 13, 2007 4:14 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: CMFFormController should abort the current transaction when the validation fails | Actions... |
|---|---|---|
| From: | Martin Aspeli (opti...@public.gmane.org) | |
| Date: | Nov 12, 2007 5:52:22 am | |
| List: | net.sourceforge.lists.plone-developers | |
Sidnei da Silva-2 wrote:
To me, wanting to write something even if the validation fails is completely nuts and anyone that even thinks about doing that needs to have a sanity check performed.
You are talking about some hipotetical case that someone 'might want' to save stuff if the validation fails, a case that is not explicitly supported and for which there's no known example of, not even tests. In my opinion, that's 'underfined behaviour' and anyone that depends on it cannot blame us if it breaks.
As per Wichert's reply:
""" If you asked someone:
During preprocessing of a submitted request you stored some data in the database. What do you expect to happen if the form validation fails?
1. the stored data disappears
2. the stored data is saved
everyone would pick 1. """
We should opt for the most sensical and expected behaviour and not try to support some hipotetical case that simply goes against reason.
I'm not sure it's that unreasonable. It depends what you mean by "validation" I suppose. In the Archetypes base validator example, invalid data should definitely mean "no-save".
However, the form controller is used for a lot of "page flow" use cases. Let's say you have a form where you input two things, and validator that checks whether the first of those two things exists in a database. If the validator fails, you may want to save the second item regardless.
In any case, it just feels wrong to me that we should use the validator handling in a form page flow component to irretrievably doom transactions. This is not how other validators work (e.g. in zope 3 schemata). Given that it's pretty easy to control this explicitly (put all your write operations in a script on the validator success path), it sounds wrong to bake an implicit transaction policy in there as well.
Martin
--
View this message in context:
http://www.nabble.com/CMFFormController-should-abort-the-current-transaction-when-the-validation-fails-tf4780633s6745.html#a13705865
Sent from the Core Developers mailing list archive at Nabble.com.
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/







