Last Comment Bug 303926 - duplicate bound nodesets do not throw xforms-binding-exception
: duplicate bound nodesets do not throw xforms-binding-exception
Status: RESOLVED FIXED
: fixed1.8.0.2, fixed1.8.1
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: ---
Assigned To: Doron Rosenberg (IBM)
: Stephen Pride
:
Mentors:
Depends on:
Blocks: 278448
  Show dependency treegraph
 
Reported: 2005-08-08 12:16 PDT by Stephen Pride
Modified: 2016-07-15 14:46 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
testcase (623 bytes, application/xhtml+xml)
2005-08-08 12:17 PDT, Stephen Pride
no flags Details
patch (7.80 KB, patch)
2005-10-28 13:29 PDT, Doron Rosenberg (IBM)
bugs: review+
aaronr: review+
Details | Diff | Splinter Review

Description Stephen Pride 2005-08-08 12:16:01 PDT
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
Comment 1 Stephen Pride 2005-08-08 12:17:54 PDT
Created attachment 191993 [details]
testcase
Comment 2 Allan Beaufour 2005-08-09 04:02:26 PDT
DispatchEvent is getting called, but it might be because it's called to early in
the process?
Comment 3 Doron Rosenberg (IBM) 2005-10-27 14:29:55 PDT
Note that moving the message another level up still doesn't show a message, so not sure this is a timing thing.
Comment 4 Doron Rosenberg (IBM) 2005-10-28 10:11:38 PDT
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.
Comment 5 Doron Rosenberg (IBM) 2005-10-28 13:29:22 PDT
Created attachment 201186 [details] [diff] [review]
patch

ModelElement should call HandleBindingException for binding exceptions.  This patch moves HandleBindingException to nsXFormsUtils as well.
Comment 6 aaronr 2005-10-28 15:18:20 PDT
Comment on attachment 201186 [details] [diff] [review]
patch

patch looks great.  r=me
Comment 7 Allan Beaufour 2005-11-01 04:13:30 PST
(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?
Comment 8 Olli Pettay [:smaug] (reviewing overload) 2005-11-07 09:40:28 PST
Comment on attachment 201186 [details] [diff] [review]
patch

looks good and works.
Comment 9 Doron Rosenberg (IBM) 2005-11-07 09:48:52 PST
(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 Allan Beaufour 2005-11-08 04:33:13 PST
(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.
Comment 11 Doron Rosenberg (IBM) 2005-11-08 06:55:15 PST
(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?
Comment 12 Doron Rosenberg (IBM) 2005-11-08 08:12:10 PST
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?
Comment 13 Allan Beaufour 2005-11-09 02:24:33 PST
(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 aaronr 2006-01-25 14:33:41 PST
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 aaronr 2006-01-25 17:09:57 PST
(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 aaronr 2006-02-02 17:20:19 PST
checked into MOZILLA_1_8_BRANCH via bug 323691.  Leaving open for now until it gets into 1.8.0
Comment 17 aaronr 2006-07-07 11:37:33 PDT
verified fixed in MOZILLA_1_8_BRANCH

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