dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16788
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6476: Fixed hibernate version for local\in modules
------------------------------------------------------------
revno: 6476
committer: Bharath <chbharathk@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-04-04 11:16:52 +0530
message:
Fixed hibernate version for local\in modules
added:
local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/ExportToExcelAction.java
modified:
local/in/dhis-in-api/pom.xml
local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/DashBoardAction.java
local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/util/AlertUtility.java
local/in/dhis-web-alert/src/main/resources/META-INF/dhis/beans.xml
local/in/dhis-web-alert/src/main/resources/struts.xml
local/in/dhis-web-alert/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/dashboardPage.vm
local/in/dhis-web-dashboard/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-dataentry-linelisting/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-excelimport/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-leprosy/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-linelisting-in/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-maintenance-in/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-reports-in/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-sandbox/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-sandboxbk/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-survey/src/main/webapp/WEB-INF/web.xml
local/in/dhis-web-validationrule-in/src/main/webapp/WEB-INF/web.xml
--
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 'local/in/dhis-in-api/pom.xml'
--- local/in/dhis-in-api/pom.xml 2012-03-30 08:17:05 +0000
+++ local/in/dhis-in-api/pom.xml 2012-04-04 05:46:52 +0000
@@ -15,6 +15,7 @@
<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-api</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
=== modified file 'local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml 2011-06-17 10:06:08 +0000
+++ local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/DashBoardAction.java'
--- local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/DashBoardAction.java 2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/DashBoardAction.java 2012-04-04 05:46:52 +0000
@@ -1,8 +1,12 @@
package org.hisp.dhis.alert.action;
+import static org.hisp.dhis.system.util.ConversionUtils.getIdentifiers;
+import static org.hisp.dhis.system.util.TextUtils.getCommaDelimitedString;
+
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
+import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@@ -51,6 +55,9 @@
public class DashBoardAction implements Action
{
+
+ private final String DASHBOARD_DATASET = "DASHBOARD";
+
// ---------------------------------------------------------------
// Dependencies
// ---------------------------------------------------------------
@@ -135,6 +142,13 @@
return selOrgUnit;
}
+ String aggOption;
+
+ public void setAggOption( String aggOption )
+ {
+ this.aggOption = aggOption;
+ }
+
// ---------------------------------------------------------------
// Action Implementation
// ---------------------------------------------------------------
@@ -145,31 +159,54 @@
navigationString = "Dashboard";
orgUnitList = new ArrayList<OrganisationUnit>();
+ if( aggOption == null || aggOption.trim().equals( "" ) )
+ {
+ aggOption = AlertUtility.USEEXISTINGAGGDATA;
+ }
+
+ // Period Info
+
Date toDay = new Date();
- Calendar cal = Calendar.getInstance();
- cal.setTime( toDay );
- cal.add( Calendar.MONTH, -1 );
- cal.set( Calendar.DATE, 1 );
+ Calendar endCal = Calendar.getInstance();
+ endCal.setTime( toDay );
+ endCal.add( Calendar.MONTH, -1 );
+ endCal.set( Calendar.DATE, 1 );
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
- String periodId = "Monthly_"+simpleDateFormat.format( cal.getTime() )+"_";
+ //String periodId = "Monthly_"+simpleDateFormat.format( cal.getTime() )+"_";
- if ( ( Calendar.YEAR % 400 == 0 || Calendar.YEAR % 4 == 0 ) && Calendar.MONTH == 1 )
+ if ( ( endCal.get( Calendar.YEAR ) % 400 == 0 || endCal.get( Calendar.YEAR ) % 4 == 0 ) && endCal.get( Calendar.MONTH ) == 1 )
{
- cal.set( Calendar.DATE, monthDays[Calendar.MONTH] + 1 );
+ endCal.set( Calendar.DATE, monthDays[Calendar.MONTH] + 1 );
}
else
{
- cal.set( Calendar.DATE, monthDays[Calendar.MONTH] );
- }
-
- periodId += simpleDateFormat.format( cal.getTime() );
-
- System.out.println( "PeriodId : " + periodId );
-
- Period selectedPeriod = periodService.getPeriodByExternalId( periodId );
-
- DataSet selectedDataSet = dataSetService.getDataSet( 1 );
+ endCal.set( Calendar.DATE, monthDays[Calendar.MONTH] );
+ }
+ Date eDate = endCal.getTime();
+
+
+ if ( endCal.get( Calendar.MONTH ) < Calendar.APRIL )
+ {
+ endCal.roll( Calendar.YEAR, -1 );
+ }
+ endCal.set( Calendar.MONTH, Calendar.APRIL );
+ endCal.set( Calendar.DATE, 1 );
+
+ //periodId += simpleDateFormat.format( cal.getTime() );
+ Date sDate = endCal.getTime();
+
+
+ List<Period> periodList = new ArrayList<Period>( periodService.getIntersectingPeriods( sDate, eDate ) );
+
+ Collection<Integer> periodIds = new ArrayList<Integer>( getIdentifiers(Period.class, periodList ) );
+
+ String periodIdsByComma = getCommaDelimitedString( periodIds );
+ //System.out.println( "PeriodId : " + periodIdsByComma );
+
+ //Period selectedPeriod = periodService.getPeriodByExternalId( periodId );
+
+ DataSet selectedDataSet = dataSetService.getDataSetByCode( DASHBOARD_DATASET );
List<OrganisationUnit> rootOrgUnitList = new ArrayList<OrganisationUnit>( );
rootOrgUnitList.addAll( currentUserService.getCurrentUser().getOrganisationUnits() );
@@ -192,6 +229,8 @@
navigationString += " -> " + selOrgUnit.getName();
}
+ navigationString += " ( " + simpleDateFormat.format( sDate ) + " TO " + simpleDateFormat.format( eDate ) + " )";
+
for( OrganisationUnit orgUnit : rootOrgUnitList )
{
List<OrganisationUnit> tempOuList = new ArrayList<OrganisationUnit>( orgUnit.getChildren() );
@@ -201,15 +240,17 @@
orgUnitList.addAll( tempOuList );
}
- if( selectedDataSet == null || selOrgUnit == null || selectedPeriod == null )
+
+ if( selectedDataSet == null || selOrgUnit == null || periodIdsByComma == null )
{
customDataEntryFormCode = " ";
}
else
{
- customDataEntryFormCode = alertUtility.getCustomDataSetReport( selectedDataSet, selOrgUnit, selectedPeriod, false, format );
+ customDataEntryFormCode = alertUtility.getCustomDataSetReport( selectedDataSet, selOrgUnit, periodIdsByComma, aggOption, format );
}
+
return SUCCESS;
}
}
=== added file 'local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/ExportToExcelAction.java'
--- local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/ExportToExcelAction.java 1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/ExportToExcelAction.java 2012-04-04 05:46:52 +0000
@@ -0,0 +1,67 @@
+package org.hisp.dhis.alert.action;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import com.opensymphony.xwork2.Action;
+
+public class ExportToExcelAction implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ // -------------------------------------------------------------------------
+ // Input & output
+ // -------------------------------------------------------------------------
+
+ private InputStream inputStream;
+
+ public InputStream getInputStream()
+ {
+ return inputStream;
+ }
+
+ private String fileName;
+
+ public String getFileName()
+ {
+ return fileName;
+ }
+
+ private String htmlCode;
+
+ public void setHtmlCode( String htmlCode )
+ {
+ this.htmlCode = htmlCode;
+ }
+
+ private String htmlCode1;
+
+ public void setHtmlCode1( String htmlCode1 )
+ {
+ this.htmlCode1 = htmlCode1;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute() throws Exception
+ {
+ fileName = "Dashboard.xls";
+
+ if( htmlCode != null )
+ {
+ inputStream = new BufferedInputStream( new ByteArrayInputStream( htmlCode.getBytes("UTF-8") ) );
+ }
+ else
+ {
+ inputStream = new BufferedInputStream( new ByteArrayInputStream( htmlCode1.getBytes("UTF-8") ) );
+ }
+
+ return SUCCESS;
+ }
+
+}
=== modified file 'local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/util/AlertUtility.java'
--- local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/util/AlertUtility.java 2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/util/AlertUtility.java 2012-04-04 05:46:52 +0000
@@ -4,12 +4,13 @@
import static org.hisp.dhis.dataentryform.DataEntryFormService.IDENTIFIER_PATTERN;
import static org.hisp.dhis.dataentryform.DataEntryFormService.INDICATOR_PATTERN;
import static org.hisp.dhis.dataentryform.DataEntryFormService.INPUT_PATTERN;
-import static org.hisp.dhis.setting.SystemSettingManager.AGGREGATION_STRATEGY_REAL_TIME;
-import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_AGGREGATION_STRATEGY;
-import static org.hisp.dhis.setting.SystemSettingManager.KEY_AGGREGATION_STRATEGY;
+import static org.hisp.dhis.system.util.ConversionUtils.getIdentifiers;
+import static org.hisp.dhis.system.util.TextUtils.getCommaDelimitedString;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.regex.Matcher;
@@ -25,7 +26,9 @@
import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.indicator.Indicator;
import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.period.Period;
+import org.hisp.dhis.reports.ReportService;
import org.hisp.dhis.setting.SystemSettingManager;
import org.hisp.dhis.system.filter.AggregatableDataElementFilter;
import org.hisp.dhis.system.util.FilterUtils;
@@ -34,7 +37,11 @@
public class AlertUtility
{
private static final String NULL_REPLACEMENT = "";
- private static final String SEPARATOR = ":";
+ private static final String SEPARATOR = ".";
+
+ public static final String GENERATEAGGDATA = "generateaggdata";
+ public static final String USEEXISTINGAGGDATA = "useexistingaggdata";
+ public static final String USECAPTUREDDATA = "usecaptureddata";
// ---------------------------------------------------------------
// Dependencies
@@ -66,21 +73,41 @@
{
this.systemSettingManager = systemSettingManager;
}
+
+ private ReportService reportService;
+
+ public void setReportService( ReportService reportService )
+ {
+ this.reportService = reportService;
+ }
+
+ private OrganisationUnitService organisationUnitService;
+
+ public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+ {
+ this.organisationUnitService = organisationUnitService;
+ }
+
// ---------------------------------------------------------------
// Supporting Methods
// ---------------------------------------------------------------
- public String getCustomDataSetReport( DataSet dataSet, OrganisationUnit unit, Period period,
- boolean selectedUnitOnly, I18nFormat format )
+ public String getCustomDataSetReport( DataSet dataSet, OrganisationUnit unit, String periodIdsByComma,
+ String aggOption, I18nFormat format )
{
- Map<String, String> aggregatedDataValueMap = getAggregatedValueMap( dataSet, unit, period, selectedUnitOnly,
- format );
+ //Map<String, String> aggregatedDataValueMap = getAggregatedValueMap( dataSet, unit, period, selectedUnitOnly,
+ // format );
- Map<Integer, String> aggregatedIndicatorMap = getAggregatedIndicatorValueMap( dataSet, unit, period, format );
+ Map<String, String> aggregatedDataValueMap = getAggregatedValueMap( dataSet, unit, periodIdsByComma, aggOption );
+
+ //Map<Integer, String> aggregatedIndicatorMap = getAggregatedIndicatorValueMap( dataSet, unit, period, format );
+
+ Map<Integer, String> aggregatedIndicatorMap = getAggregatedIndicatorValueMap( dataSet, unit, periodIdsByComma, aggOption );
return prepareReportContent( dataSet.getDataEntryForm(), aggregatedDataValueMap, aggregatedIndicatorMap );
}
+ /*
private Map<String, String> getAggregatedValueMap( DataSet dataSet, OrganisationUnit unit, Period period,
boolean selectedUnitOnly, I18nFormat format )
{
@@ -133,7 +160,9 @@
return map;
}
+*/
+/*
private Map<Integer, String> getAggregatedIndicatorValueMap( DataSet dataSet, OrganisationUnit unit, Period period,
I18nFormat format )
{
@@ -158,6 +187,7 @@
return map;
}
+*/
private String prepareReportContent( DataEntryForm dataEntryForm, Map<String, String> dataValues,
Map<Integer, String> indicatorValues )
@@ -224,4 +254,108 @@
return buffer.toString();
}
+
+
+
+ private Map<Integer, String> getAggregatedIndicatorValueMap( DataSet dataSet, OrganisationUnit unit, String periodIdsByComma, String aggOption )
+ {
+ Map<Integer, String> aggMap = new HashMap<Integer, String>();
+
+ List<Indicator> indicatorList = new ArrayList<Indicator>( dataSet.getIndicators() );
+ String dataElmentIdsByComma = reportService.getDataelementIdsAsString( indicatorList );
+
+ Map<String, String> aggDeMap = new HashMap<String, String>();
+ if( aggOption.equalsIgnoreCase( USEEXISTINGAGGDATA ) )
+ {
+ aggDeMap.putAll( reportService.getResultDataValueFromAggregateTable( unit.getId(), dataElmentIdsByComma, periodIdsByComma ) );
+ }
+ else if( aggOption.equalsIgnoreCase( GENERATEAGGDATA ) )
+ {
+ List<OrganisationUnit> childOrgUnitTree = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitWithChildren( unit.getId() ) );
+ List<Integer> childOrgUnitTreeIds = new ArrayList<Integer>( getIdentifiers( OrganisationUnit.class, childOrgUnitTree ) );
+ String childOrgUnitsByComma = getCommaDelimitedString( childOrgUnitTreeIds );
+
+ aggDeMap.putAll( reportService.getAggDataFromDataValueTable( childOrgUnitsByComma, dataElmentIdsByComma, periodIdsByComma ) );
+ }
+ else if( aggOption.equalsIgnoreCase( USECAPTUREDDATA ) )
+ {
+ aggDeMap.putAll( reportService.getAggDataFromDataValueTable( ""+unit.getId(), dataElmentIdsByComma, periodIdsByComma ) );
+ }
+
+ for ( Indicator indicator : indicatorList )
+ {
+ Double numValue = 0.0;
+ Double denValue = 0.0;
+ Double indValue = 0.0;
+
+ try
+ {
+ numValue = Double.parseDouble( reportService.getAggVal( indicator.getNumerator(), aggDeMap ) );
+ }
+ catch( Exception e )
+ {
+ numValue = 0.0;
+ }
+
+ try
+ {
+ denValue = Double.parseDouble( reportService.getAggVal( indicator.getDenominator(), aggDeMap ) );
+ }
+ catch( Exception e )
+ {
+ denValue = 0.0;
+ }
+
+ try
+ {
+ if( denValue != 0.0 )
+ {
+ indValue = ( numValue / denValue ) * indicator.getIndicatorType().getFactor();
+ }
+ else
+ {
+ indValue = 0.0;
+ }
+ }
+ catch( Exception e )
+ {
+ indValue = 0.0;
+ }
+
+ indValue = Math.round( indValue * Math.pow( 10, 1 ) ) / Math.pow( 10, 1 );
+
+ aggMap.put( indicator.getId(), indValue.toString() );
+ }
+
+ return aggMap;
+ }
+
+ private Map<String, String> getAggregatedValueMap( DataSet dataSet, OrganisationUnit unit, String periodIdsByComma, String aggOption )
+ {
+ Map<String, String> aggDeMap = new HashMap<String, String>();
+
+ List<DataElement> dataElementList = new ArrayList<DataElement>( dataSet.getDataElements() );
+ Collection<Integer> dataElementIds = new ArrayList<Integer>( getIdentifiers(DataElement.class, dataElementList ) );
+ String dataElmentIdsByComma = getCommaDelimitedString( dataElementIds );
+
+ if( aggOption.equalsIgnoreCase( USEEXISTINGAGGDATA ) )
+ {
+ aggDeMap.putAll( reportService.getResultDataValueFromAggregateTable( unit.getId(), dataElmentIdsByComma, periodIdsByComma ) );
+ }
+ else if( aggOption.equalsIgnoreCase( GENERATEAGGDATA ) )
+ {
+ List<OrganisationUnit> childOrgUnitTree = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitWithChildren( unit.getId() ) );
+ List<Integer> childOrgUnitTreeIds = new ArrayList<Integer>( getIdentifiers( OrganisationUnit.class, childOrgUnitTree ) );
+ String childOrgUnitsByComma = getCommaDelimitedString( childOrgUnitTreeIds );
+
+ aggDeMap.putAll( reportService.getAggDataFromDataValueTable( childOrgUnitsByComma, dataElmentIdsByComma, periodIdsByComma ) );
+ }
+ else if( aggOption.equalsIgnoreCase( USECAPTUREDDATA ) )
+ {
+ aggDeMap.putAll( reportService.getAggDataFromDataValueTable( ""+unit.getId(), dataElmentIdsByComma, periodIdsByComma ) );
+ }
+
+ return aggDeMap;
+ }
+
}
=== modified file 'local/in/dhis-web-alert/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-web-alert/src/main/resources/META-INF/dhis/beans.xml 2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/resources/META-INF/dhis/beans.xml 2012-04-04 05:46:52 +0000
@@ -26,6 +26,13 @@
<property name="systemSettingManager" ref="org.hisp.dhis.setting.SystemSettingManager" />
<property name="aggregatedDataValueService" ref="org.hisp.dhis.aggregation.AggregatedDataValueService" />
<property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
+ <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ <property name="reportService" ref="org.hisp.dhis.reports.ReportService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.alert.action.ExportToExcelAction"
+ class="org.hisp.dhis.alert.action.ExportToExcelAction"
+ scope="prototype">
</bean>
</beans>
\ No newline at end of file
=== modified file 'local/in/dhis-web-alert/src/main/resources/struts.xml'
--- local/in/dhis-web-alert/src/main/resources/struts.xml 2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/resources/struts.xml 2012-04-04 05:46:52 +0000
@@ -22,6 +22,17 @@
<param name="page">/dhis-web-alert/dashboardPage.vm</param>
<param name="menu">/dhis-web-alert/menu.vm</param>
</action>
+
+ <action name="exportToExcel"
+ class="org.hisp.dhis.alert.action.ExportToExcelAction">
+ <result name="success" type="stream">
+ <param name="contentType">application/vnd.ms-excel</param>
+ <param name="inputName">inputStream</param>
+ <param name="contentDisposition">
+ attachment;filename="${fileName}"</param>
+ <param name="bufferSize">1024</param>
+ </result>
+ </action>
</package>
=== modified file 'local/in/dhis-web-alert/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-alert/src/main/webapp/WEB-INF/web.xml 2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/dashboardPage.vm'
--- local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/dashboardPage.vm 2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/dashboardPage.vm 2012-04-04 05:46:52 +0000
@@ -10,23 +10,39 @@
var sleOrgUnitId = orgUnitObj.options[ orgUnitObj.selectedIndex ].value;
document.location.href = "dashboardPage.action?drillDownOrgUnitId="+sleOrgUnitId;
}
+
+ function exportToWorkBook()
+ {
+ document.getElementById('htmlCode').value = document.getElementById('formResult').innerHTML;
+ return true;
+ }
</script>
-<table width="100%">
- <tr>
- <td align="left" width="50%">$navigationString</td>
- <td align="right" width="50%">
- <select id="orgUnit" name="orgUnit" onchange="javascript:changeOrgUnit()">
- #foreach( $orgUnit in $orgUnitList )
- <option value="$orgUnit.id">$orgUnit.name</option>
- #end
- </select>
- </td>
- </tr>
-</table>
-
-<br/>
-<div>
- $customDataEntryFormCode
-</div>
+<form id="form1" name="form1" action="exportToExcel.action" method="post" onsubmit="return exportToWorkBook()" target="_newtab">
+
+ <div align="right">
+ <select id="orgUnit" name="orgUnit" onchange="javascript:changeOrgUnit()">
+ #foreach( $orgUnit in $orgUnitList )
+ <option value="$orgUnit.id" #if( $selOrgUnit.id == $orgUnit.id ) selected #end>$orgUnit.name</option>
+ #end
+ </select>
+
+ <input type="submit" name="ExportToWorkBook" value="Export To WorkBook" style="width: 160; height: 25; font-family:Arial; font-weight:bold; color:#000000" />
+ </div>
+
+ <br/><br/>
+
+ <input type="hidden" name="htmlCode" id="htmlCode" />
+
+ <div id="formResult">
+ <div align="center">
+ <font size="3" color="blue"><u><strong>$!navigationString</strong></u></font>
+ </div>
+ <br/>
+ <div>
+ $!customDataEntryFormCode
+ </div>
+ </div>
+
+</form>
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-dashboard/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-dataentry-linelisting/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-excelimport/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-excelimport/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-excelimport/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-leprosy/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-leprosy/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-leprosy/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-linelisting-in/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-maintenance-in/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-maintenance-in/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-maintenance-in/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-reports-in/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-reports-in/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-reports-in/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-sandbox/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-sandbox/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-sandbox/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-sandboxbk/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-sandboxbk/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-sandboxbk/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-survey/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-survey/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-survey/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
=== modified file 'local/in/dhis-web-validationrule-in/src/main/webapp/WEB-INF/web.xml'
--- local/in/dhis-web-validationrule-in/src/main/webapp/WEB-INF/web.xml 2011-03-08 21:38:01 +0000
+++ local/in/dhis-web-validationrule-in/src/main/webapp/WEB-INF/web.xml 2012-04-04 05:46:52 +0000
@@ -23,7 +23,7 @@
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>