| toc | |
| <mm:nextbatches>
This `listprovider' tag provides a way to implement `paging' or `batching' for large search results. It requests the `offset' and `maxnumber' settings of the surrounding querycontainer and calculates the next possible `offsets'. This is done by counting the query result without `maxnumber'. You get an exception if the `maxnumber' or `offset' tags are not used. As a list, this tag produces Strings, which you could for example use in its body with <write />. These string represents `offsets' which you can use in an url. You can of course also in the normal way give the list an id, and use the `referids' attribute of the url tag. If you prefer to have a `page' rather then an offset, then the `index' tag can be used. The default `offset' for the index tag is set to let it be `batch numbers'. (since: MMBase-1.7) |
|
| see also | previousbatches | offset | maxnumber | referids attribute of url | write | index |
| attributes |
|
| nodereferrer attributes | |
| writer attributes | |
| listprovider attributes | |
| contextreader attributes | |
| contextwriter attributes | |
| contextreferrer attributes | |
| querycontainerreferrer attributes | |
| containerreferrer attributes | |
| example 1 |
<mm:relatednodescontainer type="responses">
<mm:maxnumber value="12" />
<mm:offset value="" />
<mm:previousbatches indexoffset="1">
<mm:link referids="r.s@s,_@offset,n">
<a href=""><mm:index /></a>
</mm:link>
<jsp:text>, </jsp:text>
</mm:previousbatches>
<span class="current"><mm:index offset="1"/></span>
<mm:nextbatches indexoffset="1">
<jsp:text>, </jsp:text>
<mm:link referids="r.s@s,_@offset,n">
<a href=""><mm:index /></a>
</mm:link>
</mm:nextbatches>
</mm:relatednodescontainer>
|