lmcalpin / play--paginate Goto Github PK
View Code? Open in Web Editor NEWPlay! framework pagination module
Play! framework pagination module
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
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
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
Hi!
It would be great to have #{else} tag like we have in #{list}
Example:
${r}
Not found
Thx
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!"
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.
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.
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!
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)
Hi
I've the Play Paginate module installed, and each time I run play auto-test, a test from paginate is run and doesn't run ok.
What could this be?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.