This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Pagination" Watch "Pagination" New topic
Author

Pagination

Fawad Ali
Ranch Hand

Joined: Dec 28, 2009
Posts: 112
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: 15961
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Fawad Ali
Ranch Hand

Joined: Dec 28, 2009
Posts: 112
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: 112
No it didnt.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pagination
 
Similar Threads
Pagination
Pagination in Struts
Pagination?
Pagination
pagination