Reputation: 183
I want to use a value from one of my XForms instances, which is populated via a web service, as a parameter to a JavaScript function, I cannot seem to get working.
Something like:
<xxf:script>
var val = ORBEON.xforms.Document.getValue(instance('fr-service-response-instance')//*:MyValue);
alert(val);
</xxf:script>
The question is how do I get the value of "MyValue" from the instance? The above code throws an Orbeon exception.
Upvotes: 0
Views: 249
Reputation: 7857
The ORBEON.xforms.Document.getValue()
function can only access the value of a control present on the page. It does not provide access to arbitrary instance data, for security reasons.
If you want to expose the value of instance data which does not have an associated control, you need to create such a control. You can for example use a hidden Text Output / Calculated Value field.
Upvotes: 2