I'm developing a web search engine and it is all set in the C/Java programming, now what's left is the website, and I'm quite a newbie in this area. So, I have the results page, the results are displayed inside a div, and this div shows the content of a list, like this.
<div id="results">
<ui:repeat value="searchBean.shownResults" var="node">
node.website
node.resume
node.link
etc...
</ui:repeat>
</div>
And then I have a div to display the page roller, it is pretty much like the one you'll find if you google something and scroll down the page. I made a bean that controls what number should be displayed, so if the user clicks 10 for example, the pages displayed will be "5 6 7 8 9 10 11 12 13 14", instead of "1 2 3 4 5 6 7 8 9 10".
What I don't know how to do is to when the user clicks a page link (a number), send this number to me bean, so I can calculate the pages window and then refresh only the div where the results are displayed (and the roller, obviously enough), and the selected page must be unselectable.
Also, I would like to show the page on the url, like this www.searchengine.com/?pg=<page#>
.
-- Based on Luiggi Mendoza's answer...
<h:form>
<table>
<tr>
<ui:repeat id="foo" value="#{footer.list}" var="no">
<td>
<h:commandLink value="#{no}" action="#{footer.navigate(no)}">
<f:ajax render="@form foo"/>
</h:commandLink>
</td>
</ui:repeat>
</tr>
</table>
</h:form>