Re: Re: xxforms:iterate on xforms:action

Posted by Grégoire Neuville on
URL: https://discuss.orbeon.com/xxforms-iterate-on-xforms-action-tp3013305p3016835.html

Hi Erik,

Thanks for your answer. I followed your advice and used a 'while'
iteration with a counter to set the index from last to first position
: it definitely seems to work ! (at least in the use case I attached).
Could I have done the same with xxforms:iterate ?

Thanks again,

Grégoire.

On 28 October 2010 04:23, Erik Bruchez <[hidden email]> wrote:

> What if you dispatch starting from the last iteration?
>
> * The last iteration might be removed.
> * Then the next setindex might go out of bounds, but will be adjusted
> to point to the last iteration.
> * The worse part is that one iteration might receive the event more than once.
>
> Not sure if that makes sense, but might be worth a try!
>
> -Erik
>
> 2010/10/26 Grégoire Neuville <[hidden email]>:
>> Hi,
>>
>> In an XBL component (component A) I'm writing, I need to call through
>> an event, an action declared in an other component (component B). But
>> B components are declared inside a repeater that A contains.  Thus, in
>> A, I wrote an action that iterates on the repeater's nodeset and
>> dispatches and event to each B component (very much like another
>> thread on the list advised to do, by using xforms:setindex). So far,
>> so good, except that the action in B is responsible for the deletion,
>> under certain conditions, of the node it is bound to ; the repeater
>> index is thus messed up during the iteration, and I can't manage to
>> have the whole thing behave as expected.
>>
>> Is there a way to make such a procedure operative, or should I
>> consider using a totally different approach ?
>>
>> A use case is attached to make things clearer.
>>
>> Thanks,
>>
>> --
>> Grégoire Neuville
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Grégoire Neuville


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

form.xhtml (5K) Download Attachment