Hello!
We are using Orbeon forms with a workflow implementation to display data to the user and using the Orbeon submissions to control the workflow (through rest), Now onto my current issue, I have all the data from my workflow that I want to display, and I have a few XBL components that need this data, I was previously inserting the data directly into the controls inside the fr-form-instance. For Example. <form> <section-1> <Patient> <firstName>John</firstname> </Patient> </section-1> </form> Now the issue with this is that the controls of the XBL have to be named Patient (or what ever the data is) now, I have data that needs to be referenced by multiple XBL components. I was going to use the *xxf:instance('fr-form-instance')* to access the data that I put inside the main section for example. <form> <section-1> <patient-xbl/> <booking-xbl/> <Patient-Data> <firstName>John</firstname> </Patient-Data> </section-1> </form> Now I want the patient-xbl and the booking-xbl both to be able to reference the /Patient-Data/, I was attempting to do this with the *xxf:instance('fr-form-instance')* but had no luck getting anything. Sorry if my point hasn't come across property or if my explanation is not clear. Is there a standard way of doing this? Thanks for your time. Joel. -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1561949168479-0.post%40n4.nabble.com. |
So I've found a work around for this with help to Eric's Post
(https://gist.github.com/ebruchez/8d7e9ebd7f7b90911ecb) I created a hidden section to which I put all my data, then in my xbl I got my current binding, found the root and then dived down to find my data. Code *Form fr-instance* <xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id"> <form> <section-1> <Patient-display></Patient-display> <controls></controls> <workflow-data></workflow-data> </section-1> </form> </xf:instance> *Xbl Control (Binding ID: workflow-coding-status)* <xf:var name="binding" value="xxf:binding-context('workflow-coding-status')/root()//*[name() = 'workflow-data']" /> This the variable binding will now have all the data that I required.. Thanks for your time. Joel. -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1561959063504-0.post%40n4.nabble.com. |
Administrator
|
Thank you Joel for re-sharing that
`xxf:binding-context('workflow-coding-status')/root()//*[name() = 'workflow-data']` trick to access data outside of the XBL component from inside the component. ‑Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1562003359112-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |