Last Comment Bug 292710 - Submit bound to empty nodeset fails
: Submit bound to empty nodeset fails
Status: RESOLVED FIXED
: fixed1.8, testcase
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Allan Beaufour
: Stephen Pride
Mentors:
http://www.mozilla.org/projects/xforms/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-03 02:18 PDT by Allan Beaufour
Modified: 2016-07-15 14:46 PDT (History)
4 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Testcase (957 bytes, application/xhtml+xml)
2005-05-03 02:19 PDT, Allan Beaufour
no flags Details
Testcase v2 (1.74 KB, application/xhtml+xml)
2005-08-19 05:16 PDT, Allan Beaufour
no flags Details
Patch (3.95 KB, patch)
2005-09-26 02:14 PDT, Allan Beaufour
doronr: review+
bugs: review+
Details | Diff | Splinter Review

Description Allan Beaufour 2005-05-03 02:18:42 PDT
If a submit is triggered for a submission with @ref that returns no nodes,
nothing is submitted and the submit button is left disabled.
Comment 1 Allan Beaufour 2005-05-03 02:19:12 PDT
Created attachment 182480 [details]
Testcase
Comment 2 aaronr 2005-06-13 13:35:52 PDT
I don't get what is supposed to happen.  Can you describe what should happen? 
Not immediately apparent with your testcases.  Thanks.
Comment 3 Allan Beaufour 2005-06-14 00:28:03 PDT
(In reply to comment #2)
> I don't get what is supposed to happen.  Can you describe what should happen?

Exactly what is submitted ... I dunno? But the submit button should not stay
disabled. The instance data could be modified so that @ref points at something
valid.
Comment 4 Allan Beaufour 2005-08-19 05:16:22 PDT
Created attachment 193150 [details]
Testcase v2

Here's a better testcase, showing and explaining the problem. I suspect the
previous wasn't clear enough.
Comment 5 Allan Beaufour 2005-08-19 05:17:54 PDT
(In reply to comment #4)
> Here's a better testcase, showing and explaining the problem. I suspect the
> previous wasn't clear enough.

Problem is, besides that the button should stay disabled, what exactly should
happen to a submission with an empty nodeset. I cannot find it in the spec. Can
any of you?
Comment 6 aaronr 2005-08-23 13:55:45 PDT
Nope, I don't see anything in the spec or errata about it.  I just see what
should happen with an invalid nodeset or a required-but-empty nodeset.  I would
say that if the button is enabled to allow the empty submission the first time,
it should be enabled the whole way through and not go disabled and stay that
way.  Even if we allow it to stayed grayed, either way should have a message in
the JS Console but only if we DON'T submit anything.  If we end up finding that
we should be submitting, but submitting nothing, then probably shouldn't put a
message in the console.
Comment 7 Allan Beaufour 2005-08-24 03:17:01 PDT
Contacted the WG:
http://lists.w3.org/Archives/Member/w3c-forms/2005JulSep/0106.html
Comment 8 Allan Beaufour 2005-09-08 11:15:37 PDT
(In reply to comment #7)
> Contacted the WG:
> http://lists.w3.org/Archives/Member/w3c-forms/2005JulSep/0106.html

Has just been resolved. We should dispatch an xforms-submit-error.
Comment 9 Allan Beaufour 2005-09-26 02:14:55 PDT
Created attachment 197396 [details] [diff] [review]
Patch

Created EndSubmit() which enables the activator, and dispatches the event. This
is then called if do data is available.
Comment 10 Allan Beaufour 2005-09-27 03:48:04 PDT
Checked in to trunk
Comment 11 aaronr 2005-10-06 17:15:49 PDT
checked into branch 20051004

Note You need to log in before you can comment on or make changes to this bug.