# ListOfPage

Devuelve una lista de enteros correspondientes a todos los numeros de paginas disponibles. Se puede usar cuando tenemos un datatable y deseamos mostrar en un SelectOneMenu la lista de paginas y que el usuario seleccione un numero de la lista para desplazarse a esa pagina.

```java
public List<Integer> listOfPage(Integer rowsForPage){
}
```

## Ejemplo:

```java
      Integer rowPage =25;
      List<Integer> pages = new ArrayList<>();

    public List<Integer> getPages() {
          return paisesRepository.listOfPage(rowPage);
    }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://avbravo-2.gitbook.io/jmoordb/capitulo-8/introduccion-cap5/listofpage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
