Skip to content

Commit

Permalink
Fix issue #1388 - Allow Paginator to send correct page links on ajax
Browse files Browse the repository at this point in the history
  • Loading branch information
kjozsa authored and fmpwizard committed Jan 10, 2013
1 parent df40d43 commit 9f3e187
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions contributors.md
Expand Up @@ -95,3 +95,9 @@ Ali Salim Rashid

### Email: ###
a.rashid at zantekk dot com

### Name: ###
Kristof Jozsa

### Email: ###
kristof.jozsa at gmail dot com
6 changes: 5 additions & 1 deletion web/webkit/src/main/scala/net/liftweb/http/Paginator.scala
Expand Up @@ -187,10 +187,14 @@ trait PaginatorSnippet[T] extends Paginator[T] {
* Sets the default starting record of the page (URL query parameters take precedence over this)
*/
def first_=(f: Long) = _first = f max 0 min (count-1)
/**
* Set base URI for pagination when snippet loads
*/
val paginationBaseUri = S.uri
/**
* Returns a URL used to link to a page starting at the given record offset.
*/
def pageUrl(offset: Long): String = appendParams(S.uri, List(offsetParam -> offset.toString))
def pageUrl(offset: Long): String = appendParams(paginationBaseUri, List(offsetParam -> offset.toString))
/**
* Returns XML that links to a page starting at the given record offset, if the offset is valid and not the current one.
* @param ns The link text, if the offset is valid and not the current offset; or, if that is not the case, the static unlinked text to display
Expand Down

0 comments on commit 9f3e187

Please sign in to comment.