[HepData-svn] r1479 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Nov 2 14:15:23 GMT 2011


Author: whalley
Date: Wed Nov  2 14:15:23 2011
New Revision: 1479

Log:
allowing list of all tables with /all on the url

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewBase.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewBase.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewBase.java	Wed Nov  2 12:40:30 2011	(r1478)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewBase.java	Wed Nov  2 14:15:23 2011	(r1479)
@@ -68,8 +68,12 @@
     public Integer getStarting(){    
         return 1;
     }
+    private Boolean setall = false;
     public Integer getLength(){    
-        return 10;
+        int _defaultlength;
+        if(setall) {_defaultlength = 10000;}
+        else {_defaultlength=10;}      
+        return _defaultlength;
     }
     public boolean getIsMultiPage() {
         return getPaper().getDatasets().size() > getLength();
@@ -91,6 +95,7 @@
             if(ps.equals("prev")) { if (_counter > 20) _counter -= 20; else _counter = 1;  firstnextlast = "yes"; } 
             if(ps.equals("first")) { _counter = 1;  firstnextlast = "yes"; } 
             if(ps.equals("last")) { _counter = getPaper().getDatasets().size()-9; firstnextlast = "yes"; } 
+            if(ps.equals("all")) { _counter = 1; setall = true; }
             
             
             m = Pattern.compile("\\A" + "p" + "(\\d+)\\Z").matcher(ps);


More information about the HepData-svn mailing list