Login  Register

Event Handling within nested XBL components

Posted by Philip.Cantin on Jul 10, 2009; 8:43pm
URL: https://discuss.orbeon.com/Event-Handling-within-nested-XBL-components-tp45002.html

Hello,

I'm using nested XBL components within my main XHTML form that look like this:

<fr:idinfo>
   <fr:citation>
       <fr:citeinfo />
   </fr:citation>
</fr:idinfo>

and I have a question about event handling within the components.

Currently, I have a textarea within the <fr:citeinfo> XBL component that, when the icon next to it is clicked:

1) <fr:citeinfo> dispatches an event listened to by <fr:citation>
2)  <fr:citation> dispatches an event listened to by <fr:idinfo>
3)  <fr:idinfo> dispatches an <xxforms:show> event which opens up an HTML editor
4) The user types in information, and after clicking the 'Update' button within the editor, the formatted text is saved to the textarea.
 
I already understand how to pass information from inner XBL nodes to outer XBL nodes, but how does one pass information the other way?

I've tried using the <xbl:handlers> tag to pass information from the main XHTML form downward to the innermost XBL component, but this doesn't seem to work. What's the proper way of doing this, if any?

And is it even necessary to pass information like this from an XHTML form to XBL components? For instance, is it possible to pass context information from the innermost XBL component to the main form, and, within the <xxforms:dialog> tag, execute an <xforms:setvalue> with that context information?


Please let me know if my use case doesn't make sense, and I will be more than happy to explain further. And attached is a ZIP file that contains reproducible code that illustrates my thinking process.

Thanks in advance for any suggestions or advice!


---Philip


xforms-xbl-test.zip