Xfroms repeat help

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

Xfroms repeat help

JohnBampton
Hi I have a repeat region and it adds a line of controls to the page when I click the add button.

The only problem is that when a new line is added it is visually added to the page before the existing lines.  So each time I click add it adds it to the beginning.  How do I make it so the new line is added to the end of the block of lines?

Regards,

John.
Reply | Threaded
Open this post in threaded view
|

Re: Xfroms repeat help

Philip.Cantin
John,

In the <xforms:insert> statement that you use to add the controls, try adding the predicate 'last()' to the value of your 'nodeset' attribute, so that your statement looks like this:

<xforms:insert ... nodeset="<node>[last()]" />

This will make sure that the node you added is added to the end of the nodeset.


Hope that helps,

Philip

JohnBampton wrote
Hi I have a repeat region and it adds a line of controls to the page when I click the add button.

The only problem is that when a new line is added it is visually added to the page before the existing lines.  So each time I click add it adds it to the beginning.  How do I make it so the new line is added to the end of the block of lines?

Regards,

John.
Reply | Threaded
Open this post in threaded view
|

Re: Xfroms repeat help

Erik Bruchez-3
In reply to this post by JohnBampton
John,

We just put up a new how-to explaining this kind of stuff:

http://wiki.orbeon.com/forms/how-to/repeat-insert-position

Feedback welcome!

-Erik

On Wed, Oct 21, 2009 at 1:26 AM, JohnBampton <[hidden email]> wrote:

>
> Hi I have a repeat region and it adds a line of controls to the page when I
> click the add button.
>
> The only problem is that when a new line is added it is visually added to
> the page before the existing lines.  So each time I click add it adds it to
> the beginning.  How do I make it so the new line is added to the end of the
> block of lines?
>
> Regards,
>
> John.
> --
> View this message in context: http://n4.nabble.com/Xfroms-repeat-help-tp275932p275932.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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
> 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