dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10618
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2909: Minor fix
------------------------------------------------------------
revno: 2909
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-02-24 15:45:57 +0100
message:
Minor fix
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridJasperResult.java
dhis-2/dhis-web/dhis-web-commons/src/main/resources/grid.vm
--
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-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2011-02-23 23:39:31 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2011-02-24 14:45:57 +0000
@@ -247,7 +247,7 @@
/**
* The I18nFormat used for internationalization of ie. periods.
*/
- private transient I18nFormat i18nFormat;
+ private I18nFormat i18nFormat;
/**
* The name of the reporting month based on the report param.
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java 2011-02-23 23:26:47 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java 2011-02-24 14:45:57 +0000
@@ -399,9 +399,14 @@
public boolean next()
throws JRException
{
- int height = getHeight();
-
- return ++currentRowReadIndex < height;
+ boolean next = ++currentRowReadIndex < getHeight();
+
+ if ( !next )
+ {
+ currentRowReadIndex = -1; // Reset and return false
+ }
+
+ return next;
}
public Object getFieldValue( JRField field )
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridJasperResult.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridJasperResult.java 2011-02-23 21:26:24 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridJasperResult.java 2011-02-24 14:45:57 +0000
@@ -103,15 +103,15 @@
// Write jrxml based on Velocity template
// ---------------------------------------------------------------------
- StringWriter writer = new StringWriter();
+ final StringWriter writer = new StringWriter();
- VelocityEngine velocity = new VelocityEngine();
+ final VelocityEngine velocity = new VelocityEngine();
velocity.setProperty( Velocity.RESOURCE_LOADER, RESOURCE_LOADER_NAME );
velocity.setProperty( RESOURCE_LOADER_NAME + ".resource.loader.class", ClasspathResourceLoader.class.getName() );
velocity.init();
- VelocityContext context = new VelocityContext();
+ final VelocityContext context = new VelocityContext();
context.put( KEY_GRID, grid );
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/grid.vm'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/grid.vm 2011-02-23 19:23:07 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/grid.vm 2011-02-24 14:45:57 +0000
@@ -45,7 +45,7 @@
<chartLegend/>
</chart>
<categoryDataset>
- <dataset>
+ <dataset>
<incrementWhenExpression><![CDATA[${dollar}F{organisation_unit_is_parent}.equals( "Yes" )]]></incrementWhenExpression>
</dataset>
#foreach( $header in $grid.getHeaders() )
@@ -83,7 +83,7 @@
<columnHeader>
<band height="51" splitType="Stretch">
#set( $x = 10 )
- #foreach( $header in $grid.getVisibleHeaders() )
+ #foreach( $header in $grid.getVisibleHeaders() )
#if( $header.meta ) #set( $offset = 110 ) #else #set( $offset = 60 ) #end
<staticText>
<reportElement x="${x}" y="26" width="${offset}" height="20"/>
@@ -102,7 +102,7 @@
<detail>
<band height="21" splitType="Stretch">
#set( $x = 10 )
- #foreach( $header in $grid.getVisibleHeaders() )
+ #foreach( $header in $grid.getVisibleHeaders() )
#if( $header.meta ) #set( $offset = 110 ) #else #set( $offset = 60 ) #end
<textField>
<reportElement x="${x}" y="0" width="${offset}" height="20"/>