Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pagination

 
Fawad Ali
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • 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?
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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: 116
  • Mark post as helpful
  • send pies
  • 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.
 
Bupjae Lee
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<pagination-tag:pager start="#{viewAllInvoicesBean.start}"/> doesn't work?
 
Fawad Ali
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No it didnt.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic