Closed
Bug 293571
Opened 19 years ago
Closed 18 years ago
output not refreshed due to xpath dependency problem?
Categories
(Core Graveyard :: XForms, defect, P2)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aaronr, Assigned: allan)
References
Details
(Keywords: fixed1.8.0.4, fixed1.8.1)
Attachments
(2 files)
Well, I THINK that the summary is right. I guess Allan will have to tell us if I've gotten on the wrong track. If I 'bind' an output to instance data element using @value="/values/value[1]", the output control won't be refreshed if we do a xf:setvalue with value="/values/value[1]". However, if we change both expressions to be "/values/value", then it will refresh fine. Output elements don't end up with a mBoundNode since it calls ResetBoundNode with type = nsIDOMXPathResult::STRING_TYPE instead of evaluating for a node when it detects @value w/o other binding attributes. So the output control will depend on the xpath dependencies that come back during the call to nsXFormsXPathAnalyzer::Analyze() (called during node binding) to detect when to rebind and refresh when nsXFormsModelElement::Revalidate is called. A dependency node is found when "/values/value" is evaluated, but not when "/values/value[1]" is called. So that output control won't detect that it needs to be refreshed after set value changes the instance node. I think that I remember problems with output not refreshing correctly if bound solely with @value but I couldn't find an open bug that seemed to match this.
clicking on the trigger should update the output value from 10 to 20000
Assignee | ||
Updated•18 years ago
|
Priority: -- → P2
Hardware: PC → All
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•18 years ago
|
||
Problem is that a @value expression has no bound node (because it is STRING_TYPE), so the normal logic of mBoundNode keeping a "reference" to the "single node result" of the XPath expression does not work. This patch fixes this by letting the XPath Analyzer include the result, if the result type is of STRING_TYPE. This means that for output @value, the single node result is included in the dependencies list, and thus refreshed (rebound) correctly. (it's been a while since I've ventured down in these files. Oh, are they undocumented, etc... ouch ouch)
Assignee: aaronr → allan
Attachment #216410 -
Flags: review?(doronr)
Comment 3•18 years ago
|
||
Comment on attachment 216410 [details] [diff] [review] Patch fixed the problem
Attachment #216410 -
Flags: review?(doronr)
Attachment #216410 -
Flags: review?(aaronr)
Attachment #216410 -
Flags: review+
Attachment #216410 -
Flags: review?(aaronr) → review+
Assignee | ||
Comment 4•18 years ago
|
||
Checked into trunk
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Assignee | ||
Updated•18 years ago
|
Keywords: fixed1.8.0.3,
fixed1.8.1
Assignee | ||
Updated•18 years ago
|
Whiteboard: xf-to-branch
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•