Possibly related to 3039052.
In dataisland branch r445, setvalue (and as a result for controls) cannot set attribute values.
example shows elements work but attrs fail
It seems that XFModel.prototype.addChange is only handling changes to elements.
Here's a workaround built with little understanding of why this was the case:
XFModel.prototype.addChange = function(node) { var list = xforms.building? this.newNodesChanged : this.nodesChanged;
if \(\!inArray\(node, list\)\) \{ xforms.addChange\(this\); \} while \(\(\(node.nodeType == NodeType.ELEMENT\) || \(node.nodeType == NodeType.ATTRIBUTE\)\) && \!inArray\(node, list\)\) \{ list.push\(node\);
if (node.nodeType == NodeType.ATTRIBUTE) node = node.ownerElement; node = node.parentNode; } };
It seems that XFModel.prototype.addChange only records changes to Elements.
Here's a workaround, written without understanding of why addChange was behaving that way in the first place:
diff showing proposed workaround described in notes
Please review.
example shows elements work but attrs fail
It seems that XFModel.prototype.addChange is only handling changes to elements.
Here's a workaround built with little understanding of why this was the case:
XFModel.prototype.addChange = function(node) {
var list = xforms.building? this.newNodesChanged : this.nodesChanged;
if (node.nodeType == NodeType.ATTRIBUTE)
node = node.ownerElement;
node = node.parentNode;
}
};
It seems that XFModel.prototype.addChange only records changes to Elements.
Here's a workaround, written without understanding of why addChange was behaving that way in the first place:
XFModel.prototype.addChange = function(node) {
var list = xforms.building? this.newNodesChanged : this.nodesChanged;
if (node.nodeType == NodeType.ATTRIBUTE)
node = node.ownerElement;
node = node.parentNode;
}
};
diff showing proposed workaround described in notes
Please review.