dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16748
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6445: (local) error when loading data entry form for hospital.
------------------------------------------------------------
revno: 6445
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-30 11:49:55 +0700
message:
(local) error when loading data entry form for hospital.
modified:
local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/DataElementFormNameComparator.java
local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateLocalDataElementStore.java
local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement/LoadFormAction.java
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/entry.js
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/form.js
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/history.js
--
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/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/DataElementFormNameComparator.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/DataElementFormNameComparator.java 2012-03-29 07:41:10 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/DataElementFormNameComparator.java 2012-03-30 04:49:55 +0000
@@ -39,6 +39,6 @@
{
public int compare( DataElement dataElement0, DataElement dataElement1 )
{
- return dataElement0.getName().compareToIgnoreCase( dataElement1.getName() );
+ return dataElement0.getFormName().compareToIgnoreCase( dataElement1.getFormName() );
}
}
=== modified file 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateLocalDataElementStore.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateLocalDataElementStore.java 2012-03-29 04:55:32 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateLocalDataElementStore.java 2012-03-30 04:49:55 +0000
@@ -49,6 +49,6 @@
{
return getCriteria().createAlias( "attributeValues", "attributeValue" ).add(
Restrictions.eq( "attributeValue.attribute", attribute ) ).add(
- Restrictions.ilike( "attributeValue.value", value ) ).list();
+ Restrictions.eq( "attributeValue.value", value ).ignoreCase() ).list();
}
}
=== modified file 'local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement/LoadFormAction.java'
--- local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement/LoadFormAction.java 2012-03-29 04:55:32 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement/LoadFormAction.java 2012-03-30 04:49:55 +0000
@@ -36,14 +36,12 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.hisp.dhis.attribute.Attribute;
import org.hisp.dhis.attribute.AttributeService;
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.dataentryform.DataEntryForm;
import org.hisp.dhis.dataentryform.DataEntryFormService;
import org.hisp.dhis.dataset.DataSet;
@@ -114,17 +112,6 @@
}
// -------------------------------------------------------------------------
- // Comparator
- // -------------------------------------------------------------------------
-
- private Comparator<DataElement> dataElementComparator;
-
- public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
- {
- this.dataElementComparator = dataElementComparator;
- }
-
- // -------------------------------------------------------------------------
// Input
// -------------------------------------------------------------------------
@@ -248,7 +235,7 @@
dataElements.retainAll( dataElementsByAttr );
}
- Collections.sort( dataElements, dataElementComparator );
+// Collections.sort( dataElements, dataElementComparator );
orderedDataElements = dataElementService.getGroupedDataElementsByCategoryCombo( dataElements );
@@ -377,7 +364,7 @@
{
des = (List<DataElement>) orderedDataElements.get( categoryCombo );
- Collections.sort( des, IdentifiableObjectNameComparator.INSTANCE );
+ Collections.sort( des, new DataElementFormNameComparator() );
orderedDataElements.put( categoryCombo, des );
}
=== modified file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2012-03-24 01:29:01 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2012-03-30 04:49:55 +0000
@@ -254,7 +254,6 @@
url: 'saveValue.action',
data: dataValue,
dataType: 'json',
- cache: false,
success: handleSuccess,
error: handleError
} );
=== modified file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/form.js 2012-03-29 04:55:32 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/form.js 2012-03-30 04:49:55 +0000
@@ -518,7 +518,7 @@
if ( periodId && periodId != -1 && dataEntryFormIsLoaded )
{
showLoader();
- loadForm( getFieldValue('dataSetId') );
+ loadForm( dataSetId );
//loadDataValues();
}
}
=== modified file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/history.js'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/history.js 2012-03-24 01:29:01 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/history.js 2012-03-30 04:49:55 +0000
@@ -36,7 +36,6 @@
commentValue: commentValue
},
dataType: 'json',
- cache: false,
success: handleResponse,
error: handleError
} );
@@ -87,8 +86,7 @@
$( '#maxLimit' ).css( 'background-color', COLOR_WHITE );
refreshChart()
- },
- cache: false
+ }
} );
}
@@ -152,7 +150,6 @@
maxLimit: maxValue
},
dataType: 'json',
- cache: false,
success: function() {
$( '#minLimit' ).css( 'background-color', COLOR_GREEN );
$( '#maxLimit' ).css( 'background-color', COLOR_GREEN );
@@ -188,7 +185,6 @@
periodId: periodId,
organisationUnitId: currentOrganisationUnitId
},
- cache: false,
dataType: 'json',
success: function( json )
{