Login  Register

Re: Re: Event Handling within nested XBL components

Posted by Philip.Cantin on Aug 20, 2009; 3:50pm
URL: https://discuss.orbeon.com/Event-Handling-within-nested-XBL-components-tp45002p45008.html

Erik,

Apologies once again for this rather late reply, but thanks a bunch!!! I tested it with the 07-31-2009 and the 08-14-2009 nightly builds, and both seem to work just fine. The event handling now travels to the innermost XBL component and successfully carries out the action located there, with the help of <xbl:handlers> tags in each XBL component.

Now there is just one thing left for me to consider before I call this piece of functionality a victory. If you would, could you take a look at the reproducible example I have attached to this message? I may/may not have found another bug. Follow these steps below for reproduction:


1) Download attached ZIP file and place folder in the orbeon/WEB-INF/resources/apps folder, then run it.
2) Click icon next to first text area. A dialog window should pop up with a small (non-YUI) text area.
3) Type "hello" in the text area, and click the 'Update' button at the top. The first text area should have the value "hello" with some extra HTML.
4) Click the 'Add' button to the left of the first text area. A new section should be added.
5) Click icon next to second text area. A dialog window should pop up with NO value inside the text area of the dialog box. This reflects the current value of the second text area.
6) Repeat steps 1-5, but this time, in test_xbl.xhtml, change:

<xf:textarea ref="instance('yui-info')/tmp">

to

<xf:textarea ref="instance('yui-info')/tmp" mediatype="text/html">

so that the dialog box pops up with a YUI RTE instead of a regular text area.


Now when you get to step 5, the stale value "hello" should appear in the YUI RTE instead of a blank value. I'm wondering if this is a bug with the YUI RTE?


Thanks in advance if you get the time to take a look!


---Philip


xforms-xbl-test.zip




Erik Bruchez wrote
Philip,

The event dispatch bug is now fixed and will be in the next automatic
build. Please let us know if that works for you!

http://github.com/orbeon/orbeon-forms/commit/96cf532036c04a489b1a88556de172aa46163259

-Erik

On Wed, Jul 22, 2009 at 3:41 PM, Philip.Cantin<pjcantin@gmail.com> wrote:
>
> Alex,
>
> Sorry for not being more clear; my use case was referring to the sandbox
> example that I attached as a ZIP at the beginning of this thread
> (xforms-xbl-test.zip).
>
> The obstacle I'm trying to overcome can be reproduced with the following
> steps:
>
> 1) Open the ZIP file (I'll re-attach it below this message), copy the folder
> and run it in Orbeon.
> 2) Type "hello" within the text area.
> 3) Click the icon next to the text area - this will pop up a rich text
> editor. The word "hello" should be the value of the instance('yui-info')/tmp
> node.
> 4) Type "goodbye" and then click the 'Update' button within the editor.
>
> The value "goodbye" is saved to the <tmp> node of the 'yui-info' instance,
> but the value "hello" remains in the text area. I imagine there must be
> something wrong with my <xf:setvalue> statement. In addition, I would also
> like the value of the text area to appear in the rich text editor whenever
> it is loaded.
>
> I know, at least, that test_xforms.xhtml (my main XHTML form) is getting the
> value of the <title> node within the nested XBL components. I just want to
> be able to have that value of the text area loaded into the RTE, update that
> value, and have it display properly in the text area.
>
> If there's anything else you need to know, please let me know! And thank you
> in advance, Alex!
>
>
> ---Philip
>
>
> http://www.nabble.com/file/p24616191/xforms-xbl-test.zip xforms-xbl-test.zip
>
>
>
> Alessandro Vernet wrote:
>>
>> Philip,
>>
>>
>> Philip.Cantin wrote:
>>>
>>> While this bug is being investigated, I was wondering if it was possible
>>> to somehow "capture" the context being passed to the main form's
>>> <xxforms:dialog> control from the nested XBL component, and use it in an
>>> <xforms:setvalue> statement within the main form. I was able to do this
>>> once using the 'xxforms-dialog-open' event inside <xforms:setvalue>, but
>>> I can't seem to reference that context a second time outside of the
>>> 'xxforms-dialog-open' event.
>>>
>>
>> You're talking about "capturing the context being passed to the main
>> form's <xxforms:dialog> control from the nested XBL component". Is the
>> dialog opened from within the XBL? I am afraid I don't quite get it. Would
>> you have a very minimal example showing what you are trying to do and
>> where the problem lies?
>>
>> Alex
>>
>
> --
> View this message in context: http://www.nabble.com/Event-Handling-within-nested-XBL-components-tp24434096p24616191.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
> --
> You receive this message as a subscriber of the ops-users@ow2.org mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
> For general help: mailto:sympa@ow2.org?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws