dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06197
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1935: Fix bug: Saving-extended-dataelements-fails - Finished
------------------------------------------------------------
revno: 1935
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-06-01 11:02:23 +0700
message:
Fix bug: Saving-extended-dataelements-fails - Finished
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addExtendedDataElementForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/extendedDataElement.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateExtendedDataElementForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.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-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementAction.java 2010-05-06 13:24:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementAction.java 2010-06-01 04:02:23 +0000
@@ -88,8 +88,11 @@
public String execute()
{
+ System.out.println("\n\n\n ==== \n id = " + id);
+ System.out.println("\n dataElementService = " + dataElementService);
dataElement = dataElementService.getDataElement( id );
-
+ System.out.println("\n dataElement = " + dataElement);
+
dataElementGroups = new ArrayList<DataElementGroup>( dataElementService
.getGroupsContainingDataElement( dataElement ) );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addExtendedDataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addExtendedDataElementForm.vm 2010-06-01 02:41:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addExtendedDataElementForm.vm 2010-06-01 04:02:23 +0000
@@ -21,7 +21,7 @@
<input type="hidden" id="curLocaleCode" value="$locale.getLanguage()_$locale.getCountry()"/>
<h3>$i18n.getString( "create_new_data_element" )</h3>
-<form id="addExtendedDataElementForm" action="addExtendedDataElement.action" method="post">
+<form id="addExtendedDataElementForm" action="addExtendedDataElement.action" method="post" onsubmit="return validateAddExtendedDataElement()">
<table>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/extendedDataElement.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/extendedDataElement.js 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/extendedDataElement.js 2010-06-01 04:02:23 +0000
@@ -7,7 +7,7 @@
{
var request = new Request();
request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( addValidationCompleted );
+ request.setCallbackSuccess( addExtendedDataElementValidationCompleted );
var params = 'name=' + getFieldValue( 'name' ) +
'&shortName=' + getFieldValue( 'shortName' ) +
@@ -31,7 +31,7 @@
return false;
}
-function addValidationCompleted( messageElement )
+function addExtendedDataElementValidationCompleted( messageElement )
{
var type = messageElement.getAttribute( 'type' );
var message = messageElement.firstChild.nodeValue;
@@ -59,8 +59,8 @@
function validateUpdateExtendedDataElement()
{
var request = new Request();
- request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( updateValidationCompleted );
+ request.setResponseTypeXML( 'messageElement' );
+ request.setCallbackSuccess( updateExtendedDataElementValidationCompleted );
var params = 'id=' + getFieldValue( 'id' ) +
'&name=' + getFieldValue( 'name' ) +
@@ -78,18 +78,19 @@
'&location=' + getFieldValue( 'location' ) +
'&reportingMethods=' + getFieldValue( 'reportingMethods' ) +
'&versionStatus=' + getFieldValue( 'versionStatus' );
-
+
request.sendAsPost( params );
request.send( 'validateExtendedDataElement.action' );
return false;
}
-function updateValidationCompleted( messageElement )
-{
+function updateExtendedDataElementValidationCompleted( messageElement )
+{
+
var type = messageElement.getAttribute( 'type' );
var message = messageElement.firstChild.nodeValue;
-
+
if ( type == 'success' )
{
var form = document.getElementById( 'updateExtendedDataElementForm' );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateExtendedDataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateExtendedDataElementForm.vm 2010-06-01 02:41:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateExtendedDataElementForm.vm 2010-06-01 04:02:23 +0000
@@ -21,7 +21,7 @@
<input type="hidden" id="curLocaleCode" value="$locale.getLanguage()_$locale.getCountry()"/>
<h3>$i18n.getString( "edit_data_element" )</h3>
-<form id="updateExtendedDataElementForm" action="updateExtendedDataElement.action" method="post">
+<form id="updateExtendedDataElementForm" action="updateExtendedDataElement.action" method="post" onsubmit="return validateUpdateExtendedDataElement();">
<div>
<input type="hidden" id="id" name="id" value="$dataElement.id">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java 2009-11-24 15:39:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java 2010-06-01 04:02:23 +0000
@@ -99,7 +99,10 @@
public String execute()
throws Exception
{
-
+System.out.println("\n\n\n +++++ \n");
+System.out.println("\n aIsToB = " + aIsToB);
+System.out.println("\n bIsToA = " + bIsToA);
+System.out.println("\n description = " + description);
if ( aIsToB == null )
{
message = i18n.getString( "please_specify_the_a_side_of_the_relationship_type" );