dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10104
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2761: Changed Grid constructor
------------------------------------------------------------
revno: 2761
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-01-26 12:28:54 +0100
message:
Changed Grid constructor
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GridHeader.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridJasperResult.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-api/src/main/java/org/hisp/dhis/common/GridHeader.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GridHeader.java 2011-01-14 16:14:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GridHeader.java 2011-01-26 11:28:54 +0000
@@ -46,15 +46,29 @@
{
}
+ /**
+ * Sets the column property to the name value. Sets the type property to String.
+ *
+ * @param name name
+ * @param hidden hidden
+ * @param meta meta
+ */
public GridHeader( String name, boolean hidden, boolean meta )
{
this.name = name;
this.column = name;
- this.type = null;
+ this.type = String.class.getName();
this.hidden = hidden;
this.meta = meta;
}
+ /**
+ * @param name name
+ * @param column column
+ * @param type type
+ * @param hidden hidden
+ * @param meta meta
+ */
public GridHeader( String name, String column, String type, boolean hidden, boolean meta )
{
this.name = name;
@@ -140,6 +154,6 @@
final GridHeader other = (GridHeader) object;
- return name.equals( other.name );
+ return column.equals( other.name );
}
}
=== 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-01-14 19:53:47 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridJasperResult.java 2011-01-26 11:28:54 +0000
@@ -110,7 +110,7 @@
String filename = CodecUtils.filenameEncode( StringUtils.defaultIfEmpty( grid.getTitle(), DEFAULT_FILENAME ) ) + ".pdf";
- ContextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_PDF, true, filename, false );
+ ContextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_PDF, true, filename, true );
// ---------------------------------------------------------------------
// Write jrxml based on Velocity template