Skip to content
This repository
Browse code

Fix issue #1388 - Allow Paginator to send correct page links on ajax

  • Loading branch information...
commit 8c269034b59ba54ca5fd480a6bdac630a6920b4d 1 parent f2f1e83
Kristof Jozsa kjozsa authored
8 contributors.md
Source Rendered
@@ -76,4 +76,10 @@ gregmflanagan at gmail dot com
76 76 Ali Salim Rashid
77 77
78 78 ### Email: ###
79   -a.rashid at zantekk dot com
  79 +a.rashid at zantekk dot com
  80 +
  81 +### Name: ###
  82 +Kristof Jozsa
  83 +
  84 +### Email: ###
  85 +kristof.jozsa at gmail dot com
6 web/webkit/src/main/scala/net/liftweb/http/Paginator.scala
@@ -188,9 +188,13 @@ trait PaginatorSnippet[T] extends Paginator[T] {
188 188 */
189 189 def first_=(f: Long) = _first = f max 0 min (count-1)
190 190 /**
  191 + * Set base URI for pagination when snippet loads
  192 + */
  193 + val paginationBaseUri = S.uri
  194 + /**
191 195 * Returns a URL used to link to a page starting at the given record offset.
192 196 */
193   - def pageUrl(offset: Long): String = appendParams(S.uri, List(offsetParam -> offset.toString))
  197 + def pageUrl(offset: Long): String = appendParams(paginationBaseUri, List(offsetParam -> offset.toString))
194 198 /**
195 199 * Returns XML that links to a page starting at the given record offset, if the offset is valid and not the current one.
196 200 * @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

0 comments on commit 8c26903

Please sign in to comment.
Something went wrong with that request. Please try again.