Problems with xxforms:repeat-current()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with xxforms:repeat-current()

Ryan Puddephatt
Hi all,
    I'm trying to use xxforms:repeat-current(), but there seems to be a problem with it. I have three repeats which are nested, each repeat has a status value, if I click start at the bottom most repeat it changes the top level to start, this happens correctly. But if I click stop at the top level it should cascade the stop downward, this doesn't happen.
 
When changing the status value I have an xforms-value-changed event which changes the value of the child repeat, this should then loop through and change the value of its child repeat. The first xxforms:repeat-current() maintains the correct context, but the nested one only actions the selected repeat, i.e. the one returned but the index() function not the one where the value has been changed. So rather than xml changing from
 
<task>
    <status>started</status>
    <group>
        <status>started</status>
        <report><status>started</status></report>
        <report><status>started</status></report>
        <report><status>started</status></report>
        <report><status>started</status></report>
    </group>
    <group>
        <status>started</status>
        <report><status>started</status></report>
        <report><status>started</status></report>
        <report><status>started</status></report>
        <report><status>started</status></report>
    </group>
</task>
 
to
 
<task>
    <status>stopped</status>
    <group>
        <status>stopped</status>
        <report><status>stopped</status></report>
        <report><status>stopped</status></report>
        <report><status>stopped</status></report>
        <report><status>stopped</status></report>
    </group>
    <group>
        <status>stopped</status>
        <report><status>stopped</status></report>
        <report><status>stopped</status></report>
        <report><status>stopped</status></report>
        <report><status>stopped</status></report>
    </group>
</task>
 
it changes to
 
<task>
    <status>stopped</status>
    <group>
        <status>stopped</status>
        <report><status>stopped</status></report>
        <report><status>stopped</status></report>
        <report><status>stopped</status></report>
        <report><status>stopped</status></report>
    </group>
    <group>
        <status>stopped</status>
        <report><status>started</status></report>
        <report><status>started</status></report>
        <report><status>started</status></report>
        <report><status>started</status></report>
    </group>
</task>
 
I can send an example if needed, but it is rather complex and I don't feel there is anyway to reduce its complexity.
 
Ryan

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

 


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Problems with xxforms:repeat-current()

Alessandro  Vernet
Administrator
On 8/9/06, Ryan Puddephatt <[hidden email]> wrote:
> I can send an example if  needed, but it is rather complex and I don't feel there is
> anyway to reduce its  complexity.

Hi Ryan,

Without an example, it is hard to understand what is happening in this
case. For instance, I am not sure what the "start" and "stop" you
mention are doing. Whatever you can do to reduce the complexity of the
example will help, and if the end it is still fairly complex, we'll
still try our best to deal with it.

Alex
--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet