duplicate bound nodesets do not throw xforms-binding-exception

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
12 years ago
11 months ago

People

(Reporter: Stephen Pride, Assigned: Doron Rosenberg (IBM))

Tracking

({fixed1.8.0.2, fixed1.8.1})

Trunk
x86
All
fixed1.8.0.2, fixed1.8.1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050808 Firefox/1.0+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050808 Firefox/1.0+

See 4.2.1(4c) - For each <xf:bind>, if the node already contains a model item
property of the same name, XForms processing for this containing document halts
with an xforms-binding-exception.

Reproducible: Always
(Reporter)

Comment 1

12 years ago
Created attachment 191993 [details]
testcase

Comment 2

12 years ago
DispatchEvent is getting called, but it might be because it's called to early in
the process?
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

12 years ago
Blocks: 278448
(Assignee)

Comment 3

12 years ago
Note that moving the message another level up still doesn't show a message, so not sure this is a timing thing.
(Assignee)

Comment 4

12 years ago
smaug: "XML Event listeners " are created after document load, just before DOMContentLoaded

so that is the problem here - the event is being fired before the xml event has been added.

Note that novell doesn't do this as well - rather, it seems to always show a custom message for errors inside model.
(Assignee)

Comment 5

12 years ago
Created attachment 201186 [details] [diff] [review]
patch

ModelElement should call HandleBindingException for binding exceptions.  This patch moves HandleBindingException to nsXFormsUtils as well.
Assignee: aaronr → doronr
Status: NEW → ASSIGNED
Attachment #201186 - Flags: review?(allan)
(Assignee)

Updated

12 years ago
Attachment #201186 - Flags: review?(aaronr)

Comment 6

12 years ago
Comment on attachment 201186 [details] [diff] [review]
patch

patch looks great.  r=me
Attachment #201186 - Flags: review?(aaronr) → review+

Comment 7

12 years ago
(In reply to comment #5)
> Created an attachment (id=201186) [edit]
> patch
> 
> ModelElement should call HandleBindingException for binding exceptions.  This
> patch moves HandleBindingException to nsXFormsUtils as well.

Well, yes, the patch is fine I guess but it does not solve the problem does it?
(Assignee)

Updated

12 years ago
Attachment #201186 - Flags: review?(allan) → review?(smaug)

Comment 8

12 years ago
Comment on attachment 201186 [details] [diff] [review]
patch

looks good and works.
Attachment #201186 - Flags: review?(smaug) → review+
(Assignee)

Comment 9

12 years ago
(In reply to comment #7)
> (In reply to comment #5)
> > Created an attachment (id=201186) [edit]
> > patch
> > 
> > ModelElement should call HandleBindingException for binding exceptions.  This
> > patch moves HandleBindingException to nsXFormsUtils as well.
> 
> Well, yes, the patch is fine I guess but it does not solve the problem does it?
> 

I missed this comment.  What do you mean by not solving the problem?

Comment 10

12 years ago
(In reply to comment #9)
> > Well, yes, the patch is fine I guess but it does not solve the problem does it?
> > 
> 
> I missed this comment.  What do you mean by not solving the problem?

The testcase should show a message, right? You patch does not solve that.

It shows the "fatal error" dialogue -- that's fine, and it should. But it's not solving the problem that it's not possible to show a message upon xforms-binding-exception for a bind element.
(Assignee)

Comment 11

12 years ago
(In reply to comment #10)
> (In reply to comment #9)
> > > Well, yes, the patch is fine I guess but it does not solve the problem does it?
> > > 
> > 
> > I missed this comment.  What do you mean by not solving the problem?
> 
> The testcase should show a message, right? You patch does not solve that.
> 
> It shows the "fatal error" dialogue -- that's fine, and it should. But it's not
> solving the problem that it's not possible to show a message upon
> xforms-binding-exception for a bind element.
> 

Note that the Novell Plugin didn't do that as well.

So, would a event queue type thing on model be alright?
(Assignee)

Comment 12

12 years ago
I checked in the patch into trunk.  I'll take a look at some sort of event queue so that we can fire the events later.  I assuem that when we hit a fatal error, we should not send events anymore, right?
Whiteboard: xf-to-branch

Comment 13

12 years ago
(In reply to comment #11)
> Note that the Novell Plugin didn't do that as well.

Well, it's the spec. and not the plugin we should follow :)
 
> So, would a event queue type thing on model be alright?

I guess we need that. But I think we should rename this bug to "show fatal error dialog for bind exceptions", and do a new one then... or I personally will forget about it.

Comment 14

12 years ago
Doron, please open a new bug and attach a testcase for what this fix doesn't cover.  Otherwise I just know that this will get accidently closed when the branch patch goes in.

Comment 15

12 years ago
(In reply to comment #14)
> Doron, please open a new bug and attach a testcase for what this fix doesn't
> cover.  Otherwise I just know that this will get accidently closed when the
> branch patch goes in.
> 

Sorry, I didn't see that bug 315712 was already opened for this

Comment 16

12 years ago
checked into MOZILLA_1_8_BRANCH via bug 323691.  Leaving open for now until it gets into 1.8.0

Updated

12 years ago
Whiteboard: xf-to-branch

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Keywords: fixed1.8.0.2
Resolution: --- → FIXED

Comment 17

11 years ago
verified fixed in MOZILLA_1_8_BRANCH
Keywords: fixed1.8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.