• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

Repeating JSF code

Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, everybody.

I want to repeat this code in my page for any page I have:

<h:commandLink action="#{cliente.selectNumberPage}" value="1">
<f:param name="jsfcrud.chosenPage" value="0"/>

For example, for a list with 3 pages, it would be:

<h:commandLink action="#{cliente.selectNumberPage}" value="1">
<f:param name="jsfcrud.chosenPage" value="1"/>
<h:commandLink action="#{cliente.selectNumberPage}" value="2">
<f:param name="jsfcrud.chosenPage" value="2"/>
<h:commandLink action="#{cliente.selectNumberPage}" value="3">
<f:param name="jsfcrud.chosenPage" value="3"/>

I've tried with "c:forEach", but JSF doesn't recognize the variable when it's "loading" the page.

Does everybody knows a way to do that in a good practice way?
Get me the mayor's office! I need to tell him about this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic