Closed
Bug 317527
Opened 20 years ago
Closed 20 years ago
Show error on invalid qname for lazy created node
Categories
(Core Graveyard :: XForms, defect)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: aaronr)
References
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051116 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051116 Firefox/1.6a1
When xforms control has reference on instance node attribute then xforms error dialog is appeared bug js console is empty.
<xforms:repeat id="repeat_id" nodeset="/instanceData/lazyVal">
<xforms:input ref="@itemid"/>
</xforms:repeat>
Exception is throwing in nsXFormsUtils::EvaluateNodeBinding() method because "@itemid" is not valid QName (see http://lxr.mozilla.org/mozilla/source/extensions/xforms/nsXFormsUtils.cpp#559).
Reproducible: Always
| Reporter | ||
Comment 1•20 years ago
|
||
The binding exception is generated per spec: http://www.w3.org/TR/2005/PER-xforms-20051006/index-all.html#evt-modelConstructDone
However, we should report the error to the JS console.
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 3•20 years ago
|
||
(In reply to comment #2)
> The binding exception is generated per spec:
> http://www.w3.org/TR/2005/PER-xforms-20051006/index-all.html#evt-modelConstructDone
>
> However, we should report the error to the JS console.
>
Error in JS console is the one issue. The other is it's not clear for me :)) why if the referenced node is a element then such node is created but if the referenced node is an attribute then exception is throwing. Why did specs workers define the such behaviour?
(In reply to comment #3)
> (In reply to comment #2)
> > The binding exception is generated per spec:
> > http://www.w3.org/TR/2005/PER-xforms-20051006/index-all.html#evt-modelConstructDone
> >
> > However, we should report the error to the JS console.
> >
>
> Error in JS console is the one issue. The other is it's not clear for me :))
> why if the referenced node is a element then such node is created but if the
> referenced node is an attribute then exception is throwing. Why did specs
> workers define the such behaviour?
>
I think that the working group viewed lazy authoring as just a bridge to helping former DHTML authors get into XForms. So it will provide simple, quick instance data without any effort on the authors part. Thus the term 'lazy'. I guess that they felt that if the author had enough of an idea of the structure of their instance data to know what attributes go on what elements, then they should actually put instance data in an instance element to enforce that structure. But that is just my thoughts on it. I don't know the actual reason.
Feel free to write the forms forum www-forms@w3.org and see if you can get attributes added to lazy authoring in 1.1. It is worth a shot.
patch that adds reporting error to console.
Attachment #211306 -
Flags: review?(allan)
Attachment #211306 -
Flags: review?(doronr)
Comment 6•20 years ago
|
||
Comment on attachment 211306 [details] [diff] [review]
patch for jsconsole error output
XForms does need a better way to say "this is a lazy bind/ref/whatever", but that is a WG issue :)
Attachment #211306 -
Flags: review?(doronr) → review+
Updated•20 years ago
|
Attachment #211306 -
Flags: review?(allan) → review+
Comment 7•20 years ago
|
||
Checked in on 1_8_0
Status: NEW → ASSIGNED
Summary: repeat in lazy instance throws an exception → Show error on invalid qname for lazy created node
Comment 8•20 years ago
|
||
Check in on trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•