This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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: 24575
168
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.

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic