daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. class Messages extends DispatchSnippet {
  3.  
  4.   override def dispatch = {
  5.     case "all" => all _
  6.     case "top" => top _
  7.     case "paginate" => paginator.paginate _
  8.     case "detail" => detail _
  9.   }
  10.  
  11.   val paginator = new MapperPaginatorSnippet(Message){
  12.     override def itemsPerPage = 20
  13.     constantParams = OrderBy(Message.id, Descending)  :: Nil
  14.     override def prevXml: NodeSeq = Text(?("Prev"))
  15.     override def nextXml: NodeSeq = Text(?("Next"))
  16.     override def firstXml: NodeSeq = Text(?("First"))
  17.     override def lastXml: NodeSeq = Text(?("Last"))
  18.   }
  19. .....
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top