Closed Bug 265471 Opened 20 years ago Closed 20 years ago

Support nesting of <bind> elements

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bryner, Assigned: bryner)

Details

Attachments

(1 file, 1 obsolete file)

Bind elements are supposed to be able to nest.  If no nodeset is given on a
bind, it is inherited from its parent.  Furthermore, if a nodeset is given on a
non-outermost bind, the first node of the parent's nodeset is used as the
context node.
Attached patch patch (obsolete) — Splinter Review
This patch actually does a lot more than just support nested binds.  Here's a
summary:

- Removed all use of nsIXTFPrivate.  The overhead we had to get at the concrete
class pointer was probably more than just QI'ing to a private interface and
calling a virtual method.  Plus this is somewhat easier to follow.  New
interfaces nsIInstanceElementPrivate, nsIModelElementPrivate, and
nsIXFormsControl have the methods that other elements need to call.
- Moved all of nsXFormsControl and nsXFormsElement to be static methods on
nsXFormsUtils.	This allows for easier code reuse... the old nsXFormsControl
relied on being a visual element, which made it impossible to use for the
submission element.
- Created nsXFormsUtils::EvaluateNodeset and FindBindContext, which implement
the mechanism described above for evaluating bind elements.
- Also, to help me test that MIPs from the bind were getting applied to the
correct instance data, I implemented the 'readonly' property for the input
element.
Attachment #162870 - Flags: review?(allan)
Comment on attachment 162870 [details] [diff] [review]
patch

A bunch of good ideas. I'm game. And a good approach for how to handle nested
binds. I've tossed it around a bit, and it looks good.

But JavaDoc comments on all classes, please. With that fixed I'm "+".
Attachment #162870 - Flags: review?(allan) → review-
Added comments.
Attachment #162870 - Attachment is obsolete: true
Attachment #163057 - Flags: review?(allan)
Comment on attachment 163057 [details] [diff] [review]
patch with comments

Check.
Attachment #163057 - Flags: review?(allan) → review+
checked in
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: