Hi Peter,
The way I do it is by adding a condition to the repeat nodeset, such as
[position() >= instance('search')/from and position() <=
instance('search')/to]"
Where 'search' is an instance, specially defined for these 'utility'
functions.
Then with two triggers, 'previous' and 'next', I allow the user to
manipulate the from and to values:
<xf:setvalue ref="instance('search')/@from"
value="if(instance('search')/@from>instance('search')/@number,instance('search')/@from -
instance('search')/@number,1)"/>
<xf:setvalue ref="instance('search')/@to"
value="if(instance('search')/@from +
instance('search')/@number<count(instance('id')/Item),instance('search')/@from + instance('search')/@number -
1,count(instance('id')/Item))"/>
where @number is the number of items on a page.
Not sure if this is the easiest way, but it works.
Kind regards,
Fred van Blommestein
Citeren peter winstanley <p....@in...>:
> Hello List
>
> Is there a way of paging through items in a repeat, one page at a
> time? Is there an 'iterate' function that can be used for this?
>
> Cheers
>
> Peter
>
> ____________________________________________________________
> FREE ONLINE PHOTOSHARING - Share your photos online with your
> friends and family!
> Visit http://www.inbox.com/photosharing to find out more!
>
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> Xsltforms-support mailing list
> Xsl...@li...
> https://lists.sourceforge.net/lists/listinfo/xsltforms-support
>
|