The default bug view has changed. See this FAQ.

Submit bound to empty nodeset fails

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
12 years ago
9 months ago

People

(Reporter: Allan Beaufour, Assigned: Allan Beaufour)

Tracking

({fixed1.8, testcase})

Trunk
fixed1.8, testcase

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

1.74 KB, application/xhtml+xml
Details
3.95 KB, patch
Doron Rosenberg (IBM)
: review+
smaug
: review+
Details | Diff | Splinter Review
(Assignee)

Description

12 years ago
If a submit is triggered for a submission with @ref that returns no nodes,
nothing is submitted and the submit button is left disabled.
(Assignee)

Comment 1

12 years ago
Created attachment 182480 [details]
Testcase

Comment 2

12 years ago
I don't get what is supposed to happen.  Can you describe what should happen? 
Not immediately apparent with your testcases.  Thanks.
(Assignee)

Comment 3

12 years ago
(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.
(Assignee)

Updated

12 years ago
Summary: Submit with unbound ref fails → Submit bound to empty nodeset fails
(Assignee)

Comment 4

12 years ago
Created attachment 193150 [details]
Testcase v2

Here's a better testcase, showing and explaining the problem. I suspect the
previous wasn't clear enough.
Attachment #182480 - Attachment is obsolete: true
(Assignee)

Comment 5

12 years ago
(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?
Keywords: testcase

Comment 6

12 years ago
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.
(Assignee)

Comment 7

12 years ago
Contacted the WG:
http://lists.w3.org/Archives/Member/w3c-forms/2005JulSep/0106.html
(Assignee)

Comment 8

12 years ago
(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.
(Assignee)

Comment 9

12 years ago
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.
Attachment #197396 - Flags: review?(doronr)

Updated

12 years ago
Attachment #197396 - Flags: review?(doronr) → review+
(Assignee)

Updated

12 years ago
Attachment #197396 - Flags: review?(smaug)
Attachment #197396 - Flags: review?(smaug) → review+
(Assignee)

Comment 10

12 years ago
Checked in to trunk
Status: NEW → ASSIGNED
Whiteboard: xf-to-branch

Comment 11

12 years ago
checked into branch 20051004
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch

Updated

12 years ago
Keywords: fixed1.8
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.