The default bug view has changed. See this FAQ.

Error in context node when parent control only uses model

RESOLVED INVALID

Status

Core Graveyard
XForms
P2
normal
RESOLVED INVALID
11 years ago
8 months ago

People

(Reporter: aaronr, Assigned: aaronr)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

2.10 KB, application/xhtml+xml
Details
1.75 KB, application/xhtml+xml
Details
(Assignee)

Description

11 years ago
Assume that you have a control contained inside a repeat or a group.  The repeat/group are bound to the default instance in the default model  The control contains no @ref or @bind.  So the control should pick up its context from the repeat/group.  Now assume that there is @model on the control and the value is also the default model.  Having the model attribute on the control will result in the context of the control going from the same context as the repeat/group to being the root node in the default instance document under the model.

So, in short, having an explicit @model on a control will cause us to cease looking up our ancestor tree for our context node, even when the explicit model value is the same as the implicit model value of the containing element above it.

Confused?  Probably.  :)  Check out the testcase to really see what I mean.  We behave differently than formsPlayer.  You can probably make the argument that what we do is right, but in that case a repeat with a single node in its nodeset and a group binding to the same single node should look the same yet they don't in this testcase.
(Assignee)

Comment 1

11 years ago
Created attachment 209413 [details]
testcase
(Assignee)

Comment 2

11 years ago
(In reply to comment #1)
> Created an attachment (id=209413) [edit]
> testcase
> 

Note that while the label for the trigger inside the repeat will resolve to ESPN, it will send you to volleyball.org.

Comment 3

11 years ago
Yes, something seems wrong, but it took me a while to figure out your testcase, etc. I was not less confused...

Comment 4

11 years ago
Created attachment 210567 [details]
testcase (better, imho)
(Assignee)

Updated

11 years ago
Blocks: 326372
(Assignee)

Updated

11 years ago
Blocks: 326373

Updated

11 years ago
Priority: -- → P2
Hardware: PC → All

Updated

11 years ago
Summary: error determining context node for binding expressions → Error in context node when parent control only uses model

Comment 5

11 years ago
(In reply to comment #0)
> Assume that you have a control contained inside a repeat or a group.  The
> repeat/group are bound to the default instance in the default model  The
> control contains no @ref or @bind.  So the control should pick up its context
> from the repeat/group.  Now assume that there is @model on the control and the
> value is also the default model.  Having the model attribute on the control
> will result in the context of the control going from the same context as the
> repeat/group to being the root node in the default instance document under the
> model.

I've just re-read the spec. In section 3.2.3, it states: "One of ref or bind is required." So actually, having only @model is illegal.

I'm not saying that I agree though. I think it could be useful to f.x. use a group to specify the model for its child controls. But for now, the testcase is actually invalid.

Comment 6

11 years ago
Ok, with 1.0 closed and 1.1 probably also, this will take some time to be valid -- if ever. So this is invalid.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.