brleeflang / eurocarb

Automatically exported from code.google.com/p/eurocarb
0 stars 0 forks source link

Listing of structures for a specific contributor should be pageable #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
http://www.ebi.ac.uk/eurocarb/browse_contributor_structures.action?contributorId
=6

This shows only the first 10 structures

Original issue reported on code.google.com by hir...@gmail.com on 14 Jul 2009 at 8:18

GoogleCodeExporter commented 9 years ago
I've altered an internal call, so that it fetches all structures rather than 
the first 
10.  You should be able to page-through the structures now.

On a related matter I have also now made it possible to page-through the 
"glycan 
contexts" contributed by a contributor.

Original comment by Damerel...@googlemail.com on 3 Dec 2009 at 3:27

GoogleCodeExporter commented 9 years ago
Bear in mind that some Contributors (e.g. the 'Carbbank' virtual contributor) 
will
have a very large number of structures. A better way to page is to place limits 
on
the SQL query.... we already have a base class and freemarker macro written 
that does
the hard work, see below.

1) extend AbstractBrowseableAction (see
http://www.ebi.ac.uk/~matt/eurocarb/application/Eurocarbdb/doc/api/org/eurocarbd
b/action/AbstractBrowseAction.html
; see
http://www.ebi.ac.uk/~matt/eurocarb/application/Eurocarbdb/doc/api/src-html/org/
eurocarbdb/action/core/BrowseEvidence.html#line.53
for an example implementation). this class will set up the SQL query with the
appropriate limits and add an ORDER BY if applicable.

2) The page/start number is set through CGI parameters via the 
'<@ecdb.page_navigator
/>' freemarker macro, e.g. the 'browse_structures' template:
http://code.google.com/p/eurocarb/source/browse/trunk/application/Eurocarbdb/src
/template/action/core/browse_structures/browse.ftl

Original comment by glycosl...@googlemail.com on 3 Dec 2009 at 11:24