wood burning stoves 2.0
The moose likes JSF and the fly likes Pagination Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Pagination" Watch "Pagination" New topic
Author

Pagination

Fawad Ali
Ranch Hand

Joined: Dec 28, 2009
Posts: 115
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?


Regards, Fawad Ali.
Software Engineer, Stafona Inc. - My Blog
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17145
    
  27

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.


An IDE is no substitute for an Intelligent Developer.
Fawad Ali
Ranch Hand

Joined: Dec 28, 2009
Posts: 115
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

Joined: May 14, 2007
Posts: 107
<pagination-tag:pager start="#{viewAllInvoicesBean.start}"/> doesn't work?
Fawad Ali
Ranch Hand

Joined: Dec 28, 2009
Posts: 115
No it didnt.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pagination
 
It's not a secret anymore!