dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11446
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3265: Minor fix
------------------------------------------------------------
revno: 3265
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2011-04-02 14:26:50 +0200
message:
Minor fix
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/paging/Paging.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/paging/ActionPagingSupport.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/paging/Paging.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/paging/Paging.java 2011-04-02 12:10:56 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/paging/Paging.java 2011-04-02 12:26:50 +0000
@@ -32,7 +32,7 @@
*/
public class Paging
{
- private static final int DEFAULT_PAGE_SIZE = 50;
+ public static final int DEFAULT_PAGE_SIZE = 50;
private static final int PAGE_OFFSET = 2; // Each side of current page
private static final int PAGE_TOTAL_OFFSET = PAGE_OFFSET * 2; // Both sides of current page
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/paging/ActionPagingSupport.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/paging/ActionPagingSupport.java 2011-03-24 17:19:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/paging/ActionPagingSupport.java 2011-04-02 12:26:50 +0000
@@ -44,8 +44,6 @@
public abstract class ActionPagingSupport<T>
extends ActionSupport
{
- protected static final Integer DEFAULT_PAGE_SIZE = 50;
-
protected Integer currentPage;
public void setCurrentPage( Integer currentPage )
@@ -88,7 +86,7 @@
return Integer.valueOf( sessionPageSize );
}
- return DEFAULT_PAGE_SIZE;
+ return Paging.DEFAULT_PAGE_SIZE;
}
@SuppressWarnings( "unchecked" )
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java 2011-03-24 09:05:12 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java 2011-04-02 12:26:50 +0000
@@ -44,43 +44,30 @@
public class ContextUtils
{
public static final String CONTENT_TYPE_PDF = "application/pdf";
-
public static final String CONTENT_TYPE_ZIP = "application/zip";
-
public static final String CONTENT_TYPE_JSON = "application/json";
-
public static final String CONTENT_TYPE_HTML = "text/html";
-
public static final String CONTENT_TYPE_TEXT = "text/plain";
-
public static final String CONTENT_TYPE_XML = "application/xml";
-
public static final String CONTENT_TYPE_CSV = "application/csv";
-
public static final String CONTENT_TYPE_PNG = "image/png";
-
public static final String CONTENT_TYPE_EXCEL = "application/vnd.ms-excel";
private static final String SEPARATOR = "/";
-
private static final String PORT_SEPARATOR = ":";
-
private static final String PROTOCOL = "http://";
- private static final Map<String, String> CONTENT_TYPE_MAP = new HashMap<String, String>()
- {
- {
- put( "pdf", CONTENT_TYPE_PDF );
- put( "zip", CONTENT_TYPE_ZIP );
- put( "json", CONTENT_TYPE_JSON );
- put( "html", CONTENT_TYPE_HTML );
- put( "txt", CONTENT_TYPE_TEXT );
- put( "xml", CONTENT_TYPE_XML );
- put( "csv", CONTENT_TYPE_CSV );
- put( "png", CONTENT_TYPE_PNG );
- put( "xls", CONTENT_TYPE_EXCEL );
- }
- };
+ private static final Map<String, String> CONTENT_TYPE_MAP = new HashMap<String, String>() { {
+ put( "pdf", CONTENT_TYPE_PDF );
+ put( "zip", CONTENT_TYPE_ZIP );
+ put( "json", CONTENT_TYPE_JSON );
+ put( "html", CONTENT_TYPE_HTML );
+ put( "txt", CONTENT_TYPE_TEXT );
+ put( "xml", CONTENT_TYPE_XML );
+ put( "csv", CONTENT_TYPE_CSV );
+ put( "png", CONTENT_TYPE_PNG );
+ put( "xls", CONTENT_TYPE_EXCEL );
+ } };
public static String getContentType( String type, String defaultType )
{