Closed
Bug 274697
Opened 21 years ago
Closed 21 years ago
Using wrong contextNode in XPath evaluation
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: aaronr, Assigned: aaronr)
Details
Attachments
(2 files)
|
1.05 KB,
application/xhtml+xml
|
Details | |
|
1004 bytes,
patch
|
Details | Diff | Splinter Review |
I implemented boolean-from-string but got errors running a testcase that I will
post next. It is because I was binding a xforms:input element to a bind with a
readonly model item property that used an expression -> for example
boolean-from-string(/values/value). I found that when the expression was
evaluated by the MDG, it worked, but when it was later evaluated inside
nsXFormsInputElement::Refresh(), I wasn't getting a proper parameter.
I then noticed that the evaluation inside nsXFormsInputElement::Refresh() used
mElement (the xforms:input element) as the contextNode. However, /values/value
would have no meaning with this contextNode. When I fixed it to use the same
node as the context node that it uses to grab the readonly expression to
evaluate (similar to what the MDG does), it worked.
this is the testcase that fails. NOTE: to recreate, you'll need my latest code
for bug 258472, which I haven't posted, yet. But with the testcase you can see
how using the xforms:input as the context node of the evaluation will cause the
problem.
Here is my proposed fix. Eventually I think that it would be a better idea to
get the readonly property directly from the MDG for our controls. Maybe a
nsXFormsUtility function that can take a nsIDOMNode xtf element parameter and
do the work to figure out which instance node to ask the MDG about. But for
now, this fix will keep input element working as things currently stand.
Attachment #168753 -
Flags: superreview?(bryner)
Attachment #168753 -
Flags: review?(allan)
Comment 3•21 years ago
|
||
(In reply to comment #2)
> Eventually I think that it would be a better idea to
> get the readonly property directly from the MDG for our controls. Maybe a
> nsXFormsUtility function that can take a nsIDOMNode xtf element parameter and
> do the work to figure out which instance node to ask the MDG about. But for
> now, this fix will keep input element working as things currently stand.
Pretty please, with sugar and cream on top, look at bug 265467, there's the
answer you are looking for. Look at the patch to nsXFormsInput::Refresh().
Comment 4•21 years ago
|
||
The code is changed in bug 265467, invalidating this one.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Updated•21 years ago
|
Attachment #168753 -
Flags: superreview?(bryner)
Attachment #168753 -
Flags: review?(allan)
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
•