Code Monkey home page Code Monkey logo

play--paginate's People

Contributors

lmcalpin avatar marcosnc avatar marioosh avatar master-lincoln avatar nicogiard avatar phawk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

play--paginate's Issues

Adding paginate to a project causes 'play idealize' to fail

adding this module to a project causes all calls to play idealize to fail, tried 0.13 and head.

error:

Traceback (most recent call last):
File "c:\Dev\play-1.2.4\play", line 153, in
status = cmdloader.commands[play_command].execute(command=play_command, app=play_app, args=remaining_args, env=play_env, cmdloader=cmdloader)
File "c:\Dev\play-1.2.4\framework\pym\play\commands\intellij.py", line 49, in execute
msXML += ' \n' % (app.toRelative(srcpath).replace('', '/'))
File "c:\Dev\play-1.2.4\framework\pym\play\application.py", line 272, in toRelative
return _absoluteToRelative(path, self.path, "").replace("//", "/")
File "c:\Dev\play-1.2.4\framework\pym\play\application.py", line 279, in _absoluteToRelative
return _absoluteToRelative(path, os.path.dirname(reference), "/.." + dots)

File "c:\Dev\play-1.2.4\framework\pym\play\application.py", line 279, in _absoluteToRelative
return _absoluteToRelative(path, os.path.dirname(reference), "/.." + dots)
File "c:\Dev\play-1.2.4\python\lib\ntpath.py", line 205, in dirname
return split(p)[0]
File "c:\Dev\play-1.2.4\python\lib\ntpath.py", line 170, in split
d, p = splitdrive(p)
File "c:\Dev\play-1.2.4\python\lib\ntpath.py", line 125, in splitdrive
if p[1:2] == ':':
RuntimeError: maximum recursion depth exceeded in cmp

Two paginators on the same page

Hi Lawrence,
Firstly thanks for the great module!

Currently it seems impossible to employ two paginators on the same page as both are using the configured paginator.parameter.name and there seems to be no option to assign a parameter.name to a specific paginator.

Cheers,
Max

I18n

Hi, I'm needing to add internationalization to your project, I've already done this on my dev environment, could I collaborate with you and upload my changes?

Best regards,
Marcos

Add #{else} tag

Hi!
It would be great to have #{else} tag like we have in #{list}

Example:

{paginate.list items:paginator, as:'r'}

 ${r}

{/paginate.list}

{else}

Not found

{/else}

Thx

else tag is displayed when previous 'if' tag is not satisfied

When "IF" tag before paginate.list hasn't satisfied statement , then ELSE tag after not empty paginate.list is displayed.
Try this.

#{if false}
      This isn't visible
#{/if}

#{paginate.list items:paginator, as:"item"}
   ${item.name} <br/>
#{/paginate.list}
#{else }
    List is empty!
#{/else}

In above case we will see paginated list and "List is empty!"

Typo in documentation

Seems that http://www.playframework.org/modules/paginate-head/home

contains wrong example:

Controller code

public static void index() {
List realList = ...;
ValuePaginator paginator = new ValuePaginator(realList);
render(paginator);
}

Should obviously lead to template code:

#{paginate.list items:paginator, as:'r'} 
... ${r} // or whatever 
#{/paginate.list} 
#{paginate.controls items:paginator /} 

when example contains

 items:records

which is not correct.

Page URL creation should exclude "body" parameter

In Paginator:getCallbackURL, all view parameters are passed to the reverse method, which will create URLs like /?body=&page=1 instead of /?page=1

The Play framework itself excludes that parameter - at least in the play.mvc.Scope:urlEncode method.

new ModelPaginator(Foo.class, "foo=?", "bar") counts all rows in table

Hi, I`m using Play 1.1 and when I used this method:
ModelPaginator entities = new ModelPaginator(Foo.class, "foo=?", "bar");
It took into consideration all rows in the table when counting max rows, so the paginator displayed too many pages.
When I used this method:
ModelPaginator entities = new ModelPaginator(Foo.class, keys);
Everything went fine.

It seems like a JPA bug and I caught this line in the sql log:
21:51:28,233 DEBUG ~ select count(*) as col_0_0_ from Post post0_ limit ?
I think this is the offending sql

Anyhow, thanks for a great plugin, it saved me alot of time. Wish I could abstract things like that!

can't compile and debug from IDE

Since you're explicitly referencing JPA.getJPAConfig in JPARecordLocatorStrategy and it doesn't exist in play 1.2.x it's not possible to compile the project within an IDE. Would it be possible to update this line and use reflection similar to the line above?
JPA.class.getMethod("getJPAConfig", String.class)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.