Created
September 15, 2010 03:43
-
-
Save scsibug/580202 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Messages extends DispatchSnippet { | |
override def dispatch = { | |
case "all" => all _ | |
case "top" => top _ | |
case "paginate" => paginator.paginate _ | |
case "detail" => detail _ | |
} | |
val paginator = new MapperPaginatorSnippet(Message){ | |
override def itemsPerPage = 20 | |
constantParams = OrderBy(Message.id, Descending) :: Nil | |
override def prevXml: NodeSeq = Text(?("Prev")) | |
override def nextXml: NodeSeq = Text(?("Next")) | |
override def firstXml: NodeSeq = Text(?("First")) | |
override def lastXml: NodeSeq = Text(?("Last")) | |
} | |
..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment