Closed Bug 324468 Opened 19 years ago Closed 18 years ago

Error in context node when parent control only uses model

Categories

(Core Graveyard :: XForms, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: aaronr, Assigned: aaronr)

References

Details

Attachments

(2 files)

2.10 KB, application/xhtml+xml
Details
1.75 KB, application/xhtml+xml
Details
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.
Attached file testcase
(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.
Yes, something seems wrong, but it took me a while to figure out your testcase, etc. I was not less confused...
Blocks: 326372
Blocks: 326373
Priority: -- → P2
Hardware: PC → All
Summary: error determining context node for binding expressions → Error in context node when parent control only uses model
(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.
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
Closed: 18 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: