I have resolved this
For any one who has trouble too, this is the code i use :
<f:widget.paginate objects="{locations}" as="pagedLocations"
configuration="{itemsPerPage: 5, insertAbove: 0, insertBelow: 1}">
<f:for each="{pagedLocations}" as="location">
</f:for>
</f:widget.paginate>