• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Pagination

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
I want to achieve pagination on a page. I visit a page and on that page I have provided previous and next link. In both links I need the current page's start. I tried the following but its not helpful

<a href="viewAllInvoices.jsp?start=#{viewAllInvoicesBean.startStr}&pagination=0">Previous</a>
<a href="viewAllInvoices.jsp?start=#{viewAllInvoicesBean.startStr}&pagination=1">Next</a>

#{viewAllInvoicesBean.startStr} cannot be inserted here. Its giving compliation errors. And als I tried the JSP $ sign but its no working too.

Can anyone suggest me how to include this parameter in the link?
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Fawad Ali wrote:Hello All,
I want to achieve pagination on a page. I visit a page and on that page I have provided previous and next link. In both links I need the current page's start. I tried the following but its not helpful

<a href="viewAllInvoices.jsp?start=#{viewAllInvoicesBean.startStr}&pagination=0">Previous</a>
<a href="viewAllInvoices.jsp?start=#{viewAllInvoicesBean.startStr}&pagination=1">Next</a>

#{viewAllInvoicesBean.startStr} cannot be inserted here. Its giving compliation errors. And als I tried the JSP $ sign but its no working too.

Can anyone suggest me how to include this parameter in the link?



I think you have JSP and JSF technologies confused. They have some significant differences.
 
Fawad Ali
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Tim,
In my case, it worked like this.

<a href="viewAllCheckSummary.jsp?current=<h:outputText value="#{viewAllCheckSummaryBean.start}"></h:outputText>&pagination=0">Previous</a>
I simply output the value in managed bean and it appeared in link through <h:outputText value="#{viewAllCheckSummaryBean.start}"></h:outputText>.

Well my problem is solved here but i have one another problem now. I have a custom tag liberary.

<pagination-tag:pager start='<h:outputText value="#{viewAllInvoicesBean.start}"></h:outputText>' />.

I want to assign a value in managed bean to start attribute of sutom tag. But in this tag I cannot set the value of start to the one in managed bean. When I hard code the value, then the tag library works fine but through JSF tag it cannot be set.

Any help will save me a lot.
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<pagination-tag:pager start="#{viewAllInvoicesBean.start}"/> doesn't work?
 
Fawad Ali
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No it didnt.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic