dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16074
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6010: Remove request object from local/in/Line Listing
------------------------------------------------------------
revno: 6010
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-02-17 12:31:51 +0530
message:
Remove request object from local/in/Line Listing
modified:
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llOption/RemoveLineListOptionAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/AddLineListValidationRuleAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetLineListElementsAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetLineListValidationRuleListAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/ShowAddLineListValidationForm.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llagg/LinelistingAggregationFormAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llagg/LinelistingAggregationResultAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/DefaultSelectedStateManager.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/FormAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectedStateManager.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/RemoveLineListElementAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/UpdateLineListElementAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/RemoveLineListGroupAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/ValidateLineListGroupAction.java
local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/expression.js
local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/general.js
local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListElement.js
local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListGroup.js
local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListMappingForm.js
local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListOption.js
local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/linelistagg.js
local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/validationForm.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/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llOption/RemoveLineListOptionAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llOption/RemoveLineListOptionAction.java 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llOption/RemoveLineListOptionAction.java 2012-02-17 07:01:51 +0000
@@ -118,7 +118,8 @@
{
if ( ex.getErrorCode().equals( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS ) )
{
- message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getClassName();
+ //message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getClassName();
+ message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getMessage();
return ERROR;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/AddLineListValidationRuleAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/AddLineListValidationRuleAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/AddLineListValidationRuleAction.java 2012-02-17 07:01:51 +0000
@@ -28,9 +28,10 @@
*/
+import org.hisp.dhis.linelisting.LineListValidationRule;
+import org.hisp.dhis.linelisting.LineListValidationRuleService;
+
import com.opensymphony.xwork2.ActionSupport;
-import org.hisp.dhis.linelisting.LineListValidationRuleService;
-import org.hisp.dhis.linelisting.LineListValidationRule;
public class AddLineListValidationRuleAction
extends ActionSupport
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetLineListElementsAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetLineListElementsAction.java 2010-06-15 11:26:37 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetLineListElementsAction.java 2012-02-17 07:01:51 +0000
@@ -33,9 +33,6 @@
import java.util.Iterator;
import java.util.List;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
-
-import com.opensymphony.xwork2.ActionSupport;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryCombo;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
@@ -43,6 +40,8 @@
import org.hisp.dhis.dataelement.DataElementGroup;
import org.hisp.dhis.dataelement.DataElementService;
+import com.opensymphony.xwork2.ActionSupport;
+
/**
* @author Lars Helge Overland
* @version $Id$
@@ -84,14 +83,14 @@
// -------------------------------------------------------------------------
// DisplayPropertyHandler
// -------------------------------------------------------------------------
-
+ /*
private DisplayPropertyHandler displayPropertyHandler;
public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
{
this.displayPropertyHandler = displayPropertyHandler;
}
-
+ */
// -------------------------------------------------------------------------
// Input & output
// -------------------------------------------------------------------------
@@ -166,7 +165,7 @@
Collections.sort( dataElements, dataElementComparator );
- displayPropertyHandler.handle( dataElements );
+ // displayPropertyHandler.handle( dataElements );
if ( deOptionValue != null )
{
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetLineListValidationRuleListAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetLineListValidationRuleListAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetLineListValidationRuleListAction.java 2012-02-17 07:01:51 +0000
@@ -27,15 +27,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import com.opensymphony.xwork2.Action;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
-import com.opensymphony.xwork2.ActionSupport;
import org.hisp.dhis.linelisting.LineListValidationRule;
import org.hisp.dhis.linelisting.LineListValidationRuleService;
-import org.hisp.dhis.linelisting.comparator.LineListValidationRuleNameComparator;
+
+import com.opensymphony.xwork2.Action;
public class GetLineListValidationRuleListAction
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/ShowAddLineListValidationForm.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/ShowAddLineListValidationForm.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/ShowAddLineListValidationForm.java 2012-02-17 07:01:51 +0000
@@ -27,14 +27,15 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.linelisting.LineListService;
-
-import com.opensymphony.xwork2.Action;
import java.util.ArrayList;
import java.util.List;
+
import org.hisp.dhis.linelisting.LineListGroup;
+import org.hisp.dhis.linelisting.LineListService;
import org.hisp.dhis.ll.action.lldataentry.SelectedStateManager;
+import com.opensymphony.xwork2.Action;
+
public class ShowAddLineListValidationForm
implements Action
{
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llagg/LinelistingAggregationFormAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llagg/LinelistingAggregationFormAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llagg/LinelistingAggregationFormAction.java 2012-02-17 07:01:51 +0000
@@ -5,9 +5,9 @@
import java.util.Iterator;
import java.util.List;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
import com.opensymphony.xwork2.Action;
@@ -59,7 +59,7 @@
}
}
- Collections.sort( datasets, new DataSetNameComparator() );
+ Collections.sort( datasets, new IdentifiableObjectNameComparator() );
return SUCCESS;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llagg/LinelistingAggregationResultAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llagg/LinelistingAggregationResultAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llagg/LinelistingAggregationResultAction.java 2012-02-17 07:01:51 +0000
@@ -8,6 +8,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.dataset.DataSet;
@@ -18,8 +19,6 @@
import org.hisp.dhis.linelisting.llaggregation.LinelistAggregationMapping;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.organisationunit.comparator.OrganisationUnitNameComparator;
-import org.hisp.dhis.organisationunit.comparator.OrganisationUnitShortNameComparator;
import org.hisp.dhis.period.Period;
import org.hisp.dhis.period.PeriodService;
import org.hisp.dhis.period.PeriodType;
@@ -162,7 +161,7 @@
{
orgUnitList.add( selOrgUnit );
List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>( selOrgUnit.getChildren() );
- Collections.sort( organisationUnits, new OrganisationUnitShortNameComparator() );
+ Collections.sort( organisationUnits, new IdentifiableObjectNameComparator() );
orgUnitList.addAll( organisationUnits );
}
else
@@ -255,7 +254,7 @@
orgUnitTree.add( orgUnit );
List<OrganisationUnit> children = new ArrayList<OrganisationUnit>( orgUnit.getChildren() );
- Collections.sort( children, new OrganisationUnitNameComparator() );
+ Collections.sort( children, new IdentifiableObjectNameComparator() );
Iterator childIterator = children.iterator();
OrganisationUnit child;
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/DefaultSelectedStateManager.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/DefaultSelectedStateManager.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/DefaultSelectedStateManager.java 2012-02-17 07:01:51 +0000
@@ -27,6 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
@@ -41,12 +42,11 @@
import org.hisp.dhis.period.CalendarPeriodType;
import org.hisp.dhis.period.Period;
import org.hisp.dhis.period.PeriodType;
-
-import com.opensymphony.xwork2.ActionContext;
-import java.util.ArrayList;
import org.hisp.dhis.user.CurrentUserService;
import org.hisp.dhis.user.UserStore;
+import com.opensymphony.xwork2.ActionContext;
+
public class DefaultSelectedStateManager
implements SelectedStateManager
{
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/FormAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/FormAction.java 2011-10-07 12:25:01 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/FormAction.java 2012-02-17 07:01:51 +0000
@@ -27,10 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.i18n.I18n;
-
-import com.opensymphony.xwork2.Action;
-
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
@@ -40,19 +36,21 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Set;
+
import org.hisp.dhis.dbmanager.DataBaseManagerInterface;
+import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.linelisting.LineListDataValue;
import org.hisp.dhis.linelisting.LineListElement;
import org.hisp.dhis.linelisting.LineListGroup;
import org.hisp.dhis.linelisting.LineListOption;
import org.hisp.dhis.linelisting.LineListService;
-import org.hisp.dhis.linelisting.comparator.LineListElementNameComparator;
import org.hisp.dhis.linelisting.comparator.LineListGroupNameComparator;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.period.Period;
import org.hisp.dhis.period.PeriodService;
+import com.opensymphony.xwork2.Action;
+
/**
* @author Torgeir Lorange Ostby
* @version $Id: FormAction.java 4733 2008-03-13 15:26:24Z larshelg $
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectedStateManager.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectedStateManager.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectedStateManager.java 2012-02-17 07:01:51 +0000
@@ -32,7 +32,6 @@
import org.hisp.dhis.linelisting.LineListGroup;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodType;
/**
* @author Torgeir Lorange Ostby
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/RemoveLineListElementAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/RemoveLineListElementAction.java 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/RemoveLineListElementAction.java 2012-02-17 07:01:51 +0000
@@ -27,15 +27,16 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.linelisting.LineListService;
-
-import com.opensymphony.xwork2.Action;
import java.util.Collection;
import java.util.Iterator;
+
import org.hisp.dhis.common.DeleteNotAllowedException;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.linelisting.LineListElement;
import org.hisp.dhis.linelisting.LineListGroup;
+import org.hisp.dhis.linelisting.LineListService;
+
+import com.opensymphony.xwork2.Action;
public class RemoveLineListElementAction
implements Action
@@ -109,7 +110,8 @@
{
if ( ex.getErrorCode().equals( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS ) )
{
- message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getClassName();
+ //message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getClassName();
+ message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getMessage();
return ERROR;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/UpdateLineListElementAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/UpdateLineListElementAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/UpdateLineListElementAction.java 2012-02-17 07:01:51 +0000
@@ -27,6 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
@@ -35,7 +36,6 @@
import org.hisp.dhis.linelisting.LineListService;
import com.opensymphony.xwork2.Action;
-import java.util.ArrayList;
public class UpdateLineListElementAction
implements Action
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/RemoveLineListGroupAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/RemoveLineListGroupAction.java 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/RemoveLineListGroupAction.java 2012-02-17 07:01:51 +0000
@@ -29,7 +29,6 @@
import org.hisp.dhis.common.DeleteNotAllowedException;
import org.hisp.dhis.dbmanager.DataBaseManagerInterface;
import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.linelisting.LineListElement;
import org.hisp.dhis.linelisting.LineListService;
import com.opensymphony.xwork2.Action;
@@ -116,7 +115,8 @@
{
if ( ex.getErrorCode().equals( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS ) )
{
- message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getClassName();
+ //message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getClassName();
+ message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getMessage();
return ERROR;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/ValidateLineListGroupAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/ValidateLineListGroupAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/ValidateLineListGroupAction.java 2012-02-17 07:01:51 +0000
@@ -27,16 +27,17 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.linelisting.LineListGroup;
-import org.hisp.dhis.linelisting.LineListService;
-
-import com.opensymphony.xwork2.Action;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+
import org.hisp.dhis.dbmanager.DataBaseManagerInterface;
+import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.linelisting.LineListElement;
+import org.hisp.dhis.linelisting.LineListGroup;
+import org.hisp.dhis.linelisting.LineListService;
+
+import com.opensymphony.xwork2.Action;
public class ValidateLineListGroupAction
implements Action
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/expression.js'
--- local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/expression.js 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/expression.js 2012-02-17 07:01:51 +0000
@@ -51,12 +51,25 @@
var dataElementGroupId = dataElementGroup.options[ dataElementGroup.selectedIndex ].value;
var filter = htmlEncode( document.getElementById( filterName ).value );
+ /*
var url = "getFilteredDataElements.action?dataElementGroupId=" + dataElementGroupId + "&filter=" + filter;
var request = new Request();
request.setResponseTypeXML( 'operand' );
request.setCallbackSuccess( getFilteredDataElementsReceived );
request.send( url );
+ */
+
+ $.post("getFilteredDataElements.action",
+ {
+ dataElementGroupId : dataElementGroupId,
+ filter : filter
+ },
+ function (data)
+ {
+ getFilteredDataElementsReceived(data);
+ },'xml');
+
}
function getFilteredDataElementsReceived( xmlObject )
@@ -83,11 +96,22 @@
{
var expression = htmlEncode( document.getElementById( expressionFieldName ).value );
+ /*
var url = "getTextualExpression.action?expression=" + expression;
var request = new Request();
request.setCallbackSuccess( updateTextualExpressionReceived );
request.send( url );
+ */
+ $.post("getTextualExpression.action",
+ {
+ expression : expression
+ },
+ function (data)
+ {
+ updateTextualExpressionReceived(data);
+ },'xml');
+
}
function updateTextualExpressionReceived( messageElement )
@@ -99,13 +123,26 @@
{
var description = htmlEncode( document.getElementById( "description" ).value );
var expression = htmlEncode( document.getElementById( "expression" ).value );
-
+ /*
var url = "validateExpression.action?description=" + description + "&expression=" + expression;
var request = new Request();
request.setResponseTypeXML( "message" );
request.setCallbackSuccess( validateExpressionReceived );
- request.send( url );
+ request.send( url );
+ */
+ $.post("validateExpression.action",
+ {
+ description : description,
+ expression : expression
+ },
+ function (data)
+ {
+ validateExpressionReceived(data);
+ },'xml');
+
+
+
}
function validateExpressionReceived( xmlObject )
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/general.js'
--- local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/general.js 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/general.js 2012-02-17 07:01:51 +0000
@@ -1268,12 +1268,26 @@
this.save = function()
{
- var request = new Request();
+ /*
+ var request = new Request();
request.setCallbackSuccess( handleResponse );
request.setCallbackError( handleHttpError );
request.setResponseTypeXML( 'status' );
request.send( 'saveValue.action?dataElementId=' +
dataElementId + '&value=' + value );
+ */
+ $.post("saveValue.action",
+ {
+ dataElementId : dataElementId,
+ value : value
+ },
+ function (data)
+ {
+ handleResponse(data);
+ },'xml');
+
+
+
};
function handleResponse( rootElement )
@@ -1346,12 +1360,25 @@
this.save = function()
{
- var request = new Request();
+ /*
+ var request = new Request();
request.setCallbackSuccess( handleResponse );
request.setCallbackError( handleHttpError );
request.setResponseTypeXML( 'status' );
request.send( 'saveComment.action?dataElementId=' +
dataElementId + '&comment=' + value );
+ */
+ $.post("saveComment.action",
+ {
+ dataElementId : dataElementId,
+ comment : value
+ },
+ function (data)
+ {
+ handleResponse(data);
+ },'xml');
+
+
};
function handleResponse( rootElement )
@@ -1473,10 +1500,21 @@
function calculateAndSaveCDEs()
{
- var request = new Request();
+ /*
+ var request = new Request();
request.setCallbackSuccess( dataValuesReceived );
request.setResponseTypeXML( 'dataValues' );
request.send( 'calculateCDEs.action' );
+ */
+ $.post("calculateCDEs.action",
+ {
+
+
+ },
+ function (data)
+ {
+ dataValuesReceived(data);
+ },'xml');
}
function dataValuesReceived( node )
@@ -1497,10 +1535,22 @@
function saveLineListingAggData()
{
- var request = new Request();
+ /*
+ var request = new Request();
request.setCallbackSuccess( saveLineListingAggDataReceived );
request.setResponseTypeXML( 'dataValues' );
request.send( 'saveLineListingAggData.action' );
+ */
+ $.post("saveLineListingAggData.action",
+ {
+
+
+ },
+ function (data)
+ {
+ saveLineListingAggDataReceived(data);
+ },'xml');
+
}
function saveLineListingAggDataReceived( node )
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListElement.js'
--- local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListElement.js 2011-10-07 12:25:01 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListElement.js 2012-02-17 07:01:51 +0000
@@ -5,10 +5,20 @@
function showLineListElementDetails( lineListElementId )
{
+ /*
var request = new Request();
request.setResponseTypeXML( 'getLineListElements' );
request.setCallbackSuccess( lineListElementReceived );
request.send( 'getLineListElement.action?lineListElementId=' + lineListElementId );
+ */
+ $.post("getLineListElement.action",
+ {
+ lineListElementId : lineListElementId
+ },
+ function (data)
+ {
+ lineListElementReceived(data);
+ },'xml');
}
function lineListElementReceived( lineListElementElement )
@@ -44,10 +54,20 @@
if ( result )
{
- var request = new Request();
+ /*
+ var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( removeLineListElementCompleted );
request.send( 'removeLineListElement.action?lineListElementId=' + lineListElementId);
+ */
+ $.post("removeLineListElement.action",
+ {
+ lineListElementId : lineListElementId
+ },
+ function (data)
+ {
+ removeLineListElementCompleted(data);
+ },'xml');
}
}
@@ -75,7 +95,8 @@
function validateAddLineListElement()
{
- var request = new Request();
+ /*
+ var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( addLineListElementValidationCompleted );
@@ -85,6 +106,20 @@
'&presentationType=' + document.getElementById( 'presentationType' ).value;
request.send( requestString );
+ */
+
+ $.post("validateLineListElement.action",
+ {
+ name : document.getElementById( 'name' ).value,
+ shortName : getFieldValue( 'shortName' ),
+ dataType : document.getElementById( 'dataType' ).value,
+ presentationType : document.getElementById( 'presentationType' ).value
+ },
+ function (data)
+ {
+ addLineListElementValidationCompleted(data);
+ },'xml');
+
return false;
}
@@ -117,6 +152,7 @@
function validateUpdateLineListElement()
{
+ /*
var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( editLineListElementValidationCompleted );
@@ -126,6 +162,19 @@
'&shortName=' + getFieldValue( 'shortName' ) +
'&dataType=' + getFieldValue( 'dataType' ) +
'&presentationType=' + getFieldValue( 'presentationType' ) );
+ */
+ $.post("validateLineListElement.action",
+ {
+ id : getFieldValue ( 'lineListElementId' ),
+ name : getFieldValue( 'name' ),
+ shortName : getFieldValue( 'shortName' ),
+ dataType : getFieldValue( 'dataType' ),
+ presentationType : getFieldValue( 'presentationType' )
+ },
+ function (data)
+ {
+ editLineListElementValidationCompleted(data);
+ },'xml');
return false;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListGroup.js'
--- local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListGroup.js 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListGroup.js 2012-02-17 07:01:51 +0000
@@ -5,10 +5,20 @@
function showLineListGroupDetails( lineListGroupId )
{
- var request = new Request();
+ /*
+ var request = new Request();
request.setResponseTypeXML( 'getLineListGroups' );
request.setCallbackSuccess( lineListGroupReceived );
request.send( 'getLineListGroup.action?id=' + lineListGroupId );
+ */
+ $.post("getLineListGroup.action",
+ {
+ id : lineListGroupId
+ },
+ function (data)
+ {
+ lineListGroupReceived(data);
+ },'xml');
}
function lineListGroupReceived( lineListGroupElement )
@@ -45,12 +55,26 @@
{
var selectedListOption = document.getElementById( 'selectedList' );
var selectedListNumber = selectedListOption.options.length;
- var request = new Request();
+ /*
+ var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( addValidationCompleted );
request.send( 'validateLineListGroupAdd.action?name=' + getFieldValue( 'name' ) +
'&shortName=' + htmlEncode( getFieldValue( 'shortName' ) ) +
'&periodTypeSelect=' + htmlEncode( getFieldValue( 'periodTypeSelect' ) ) + '&selectedListNumber=' + selectedListNumber );
+ */
+ $.post("validateLineListGroupAdd.action",
+ {
+ name : getFieldValue( 'name' ),
+ shortName : htmlEncode( getFieldValue( 'shortName' ) ),
+ periodTypeSelect : htmlEncode( getFieldValue( 'periodTypeSelect' ) ),
+ selectedListNumber : selectedListNumber
+ },
+ function (data)
+ {
+ addValidationCompleted(data);
+ },'xml');
+
return false;
}
@@ -85,21 +109,36 @@
function validateUpdateLineListGroup()
{
+ /*
var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( updateValidationCompleted );
selectAllById( 'selectedList' );
+ */
var selectedList = "";
+
for ( var id in groupMembers )
{
selectedList = selectedList +","+ id ;
}
-
+ /*
request.send( 'validateLineListGroup.action?id=' + getFieldValue( 'id' ) +
'&name=' + getFieldValue( 'name' ) +
'&shortName=' + getFieldValue( 'shortName' ) +
'&selectedList=' + selectedList );
-
+ */
+ $.post("validateLineListGroup.action",
+ {
+ id : getFieldValue( 'id' ),
+ name : getFieldValue( 'name' ),
+ shortName : getFieldValue( 'shortName' ),
+ selectedList : selectedList
+ },
+ function (data)
+ {
+ updateValidationCompleted(data);
+ },'xml');
+
return false;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListMappingForm.js'
--- local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListMappingForm.js 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListMappingForm.js 2012-02-17 07:01:51 +0000
@@ -5,13 +5,27 @@
function validateLineListMapping()
{
- var request = new Request();
+ /*
+ var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( addLineListMappingCompleted );
request.send( 'validateValidationRule.action?name=' + getFieldValue( 'name' ) +
'&leftSideExpression=' + getFieldValue( 'leftSideExpression' ) +
'&rightSideExpression=' + getFieldValue( 'rightSideExpression' ) +
-
+ */
+
+ $.post("validateValidationRule.action",
+ {
+ name : getFieldValue( 'name' ),
+ leftSideExpression : getFieldValue( 'leftSideExpression' ),
+ rightSideExpression : getFieldValue( 'rightSideExpression' )
+ },
+ function (data)
+ {
+ addLineListMappingCompleted(data);
+ },'xml');
+
+
return false;
}
@@ -43,6 +57,7 @@
function validateUpdateLineListMapping()
{
+ /*
var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( updateLineListMappingCompleted );
@@ -50,7 +65,20 @@
'&name=' + getFieldValue( 'name' ) +
'&leftSideExpression=' + getFieldValue( 'leftSideExpression' ) +
'&rightSideExpression=' + getFieldValue( 'rightSideExpression' ) +
-
+ */
+ $.post("validateValidationRule.action",
+ {
+ id : getFieldValue( 'id' ),
+ name : getFieldValue( 'name' ),
+ leftSideExpression : getFieldValue( 'leftSideExpression' ),
+ rightSideExpression : getFieldValue( 'rightSideExpression' )
+ },
+ function (data)
+ {
+ updateLineListMappingCompleted(data);
+ },'xml');
+
+
return false;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListOption.js'
--- local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListOption.js 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListOption.js 2012-02-17 07:01:51 +0000
@@ -9,6 +9,17 @@
request.setResponseTypeXML( 'lineListOption' );
request.setCallbackSuccess( LineListOptionReceived );
request.send( 'getLineListOption.action?id=' + LineListOptionId );
+
+ $.post("getLineListOption.action",
+ {
+ id:LineListOptionId
+ },
+ function (data)
+ {
+ LineListOptionReceived(data);
+ },'xml');
+
+
}
function LineListOptionReceived( LineListOptionElement )
@@ -33,11 +44,21 @@
{
url += "LineListOptionGroupId=" + LineListOptionGroupId;
}
-
+ /*
var request = new Request();
request.setResponseTypeXML( 'LineListOption' );
request.setCallbackSuccess( getLineListOptionsReceived );
- request.send( url );
+ request.send( url );
+ */
+ $.post("getLineListOptions.action",
+ {
+ LineListOptionGroupId:LineListOptionGroupId
+ },
+ function (data)
+ {
+ getLineListOptionsReceived(data);
+ },'xml');
+
}
function getLineListOptionsReceived( xmlObject )
@@ -67,15 +88,25 @@
function removeLineListOption( LineListOptionId, LineListOptionName )
{
- //var result = window.confirm( i18n_confirm_delete + '\n\n' + LineListOptionName );
+ //var result = window.confirm( i18n_confirm_delete + '\n\n' + LineListOptionName );
var result = window.confirm( i18n_confirm_delete + '\n\nLine List Option Name: ' + LineListOptionName + '\n\n Line List Option Id: ' + LineListOptionId);
if ( result )
{
- var request = new Request();
+ /*
+ var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( removeLineListOptionCompleted );
request.send( 'removeLineListOption.action?id=' + LineListOptionId );
+ */
+ $.post("removeLineListOption.action",
+ {
+ id:LineListOptionId
+ },
+ function (data)
+ {
+ removeLineListOptionCompleted(data);
+ },'xml');
}
}
@@ -103,7 +134,7 @@
function validateAddLineListOption()
{
-
+ /*
var url = 'validateLineListOption.action?' +
'&name=' + htmlEncode( getFieldValue( 'name' ) ) +
'&shortName=' + htmlEncode( getFieldValue( 'shortName' ) );
@@ -112,6 +143,18 @@
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( addValidationCompleted );
request.send( url );
+ */
+ $.post("validateLineListOption.action",
+ {
+ name : htmlEncode( getFieldValue( 'name' ) ),
+ shortName : htmlEncode( getFieldValue( 'shortName' ) )
+ },
+ function (data)
+ {
+ addValidationCompleted(data);
+ },'xml');
+
+
return false;
}
@@ -251,7 +294,8 @@
function validateUpdateLineListOption()
{
- var url = 'validateLineListOption.action?' +
+ /*
+ var url = 'validateLineListOption.action?' +
'&id=' + getFieldValue( 'id' ) +
'&name=' + htmlEncode( getFieldValue( 'name' ) ) +
'&shortName=' + htmlEncode( getFieldValue( 'shortName' ) );
@@ -260,7 +304,19 @@
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( updateValidationCompleted );
request.send( url );
-
+ */
+ $.post("validateLineListOption.action",
+ {
+ id : getFieldValue( 'id' ),
+ name : htmlEncode( getFieldValue( 'name' ) ),
+ shortName : htmlEncode( getFieldValue( 'shortName' ) )
+ },
+ function (data)
+ {
+ updateValidationCompleted(data);
+ },'xml');
+
+
return false;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/linelistagg.js'
--- local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/linelistagg.js 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/linelistagg.js 2012-02-17 07:01:51 +0000
@@ -6,7 +6,8 @@
{
var degroup = document.getElementById( 'degroup' );
var degId = degroup.options[ degroup.selectedIndex ].value;
-
+
+ /*
var requestString = 'getAggDataElements.action?degId=' + degId;
var request = new Request();
@@ -14,6 +15,15 @@
request.setCallbackSuccess( getAggDataElementsCompleted );
request.send( requestString );
+ */
+ $.post("getAggDataElements.action",
+ {
+ degId : degId
+ },
+ function (data)
+ {
+ getAggDataElementsCompleted(data);
+ },'xml');
}
function getAggDataElementsCompleted( dataelementElement )
@@ -48,13 +58,25 @@
var llgroup = document.getElementById( 'llgroup' );
var llgId = llgroup.options[ llgroup.selectedIndex ].value;
+ /*
var requestString = 'getLLGroupElements.action?llgId=' + llgId;
var request = new Request();
request.setResponseTypeXML( 'lineListElement' );
request.setCallbackSuccess( getLinelistElementsCompleted );
- request.send( requestString );
+ request.send( requestString );
+ */
+
+ $.post("getLLGroupElements.action",
+ {
+ llgId : llgId
+ },
+ function (data)
+ {
+ getLinelistElementsCompleted(data);
+ },'xml');
+
}
function getLinelistElementsCompleted( linelistelementElement )
@@ -87,6 +109,7 @@
var aggde = document.getElementById( 'aggde' );
var aggdeId = aggde.options[ aggde.selectedIndex ].value;
+ /*
var requestString = 'getLinelistAggExpression.action?aggdeId=' + aggdeId;
var request = new Request();
@@ -94,6 +117,16 @@
request.setCallbackSuccess( getLinelistAggExpressionCompleted );
request.send( requestString );
+ */
+ $.post("getLinelistAggExpression.action",
+ {
+ aggdeId : aggdeId
+ },
+ function (data)
+ {
+ getLinelistAggExpressionCompleted(data);
+ },'xml');
+
}
function getLinelistAggExpressionCompleted( expressionElement )
@@ -125,12 +158,23 @@
{
var dataSetList = document.getElementById("selectedDataSets");
var dataSetId = dataSetList.options[ dataSetList.selectedIndex].value;
+
+ /*
var url = "getDataSetPeriods.action?id=" + dataSetId;
var request = new Request();
request.setResponseTypeXML( 'period' );
request.setCallbackSuccess( getdSetPeriodsReceived );
- request.send( url );
+ request.send( url );
+ */
+ $.post("getDataSetPeriods.action",
+ {
+ id : dataSetId
+ },
+ function (data)
+ {
+ getdSetPeriodsReceived(data);
+ },'xml');
}
function getdSetPeriodsReceived( xmlObject )
@@ -178,12 +222,23 @@
//--------------------------------------------------------------
function getOrgUDetails(orgUnitIds)
{
+ /*
var url = "getOrgUnitDetails.action?orgUnitId=" + orgUnitIds;
var request = new Request();
request.setResponseTypeXML( 'orgunit' );
request.setCallbackSuccess( getOrgUDetailsRecevied );
request.send( url );
+ */
+ $.post("getOrgUnitDetails.action",
+ {
+ orgUnitId : orgUnitIds
+ },
+ function (data)
+ {
+ getOrgUDetailsRecevied(data);
+ },'xml');
+
}
function getOrgUDetailsRecevied(xmlObject)
@@ -231,7 +286,8 @@
return true;
-} // formValidations Function End
+}
+ // formValidations Function End
//-----------------------------------------------------------------
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/validationForm.js'
--- local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/validationForm.js 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/validationForm.js 2012-02-17 07:01:51 +0000
@@ -7,11 +7,23 @@
alert("inside getLineListElements groupid = "+lineListGroupId);
if ( lineListGroupId != null )
{
- var url = "getFilteredLineListElements.action?id=" + lineListGroupId;
+ /*
+ var url = "getFilteredLineListElements.action?id=" + lineListGroupId;
var request = new Request();
request.setResponseTypeXML('lineListElement');
request.setCallbackSuccess(getLineListElementsReceived);
request.send(url);
+ */
+
+ $.post("getFilteredLineListElements.action",
+ {
+ id:lineListGroupId
+ //yearList:yearList
+ },
+ function (data)
+ {
+ getLineListElementsReceived(data);
+ },'xml');
}
}
@@ -46,6 +58,7 @@
function validateAddValidationRule()
{
+ /*
var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( addValidationCompleted );
@@ -55,7 +68,22 @@
'&leftSideDescription=' + getFieldValue( 'leftSideDescription' ) +
'&rightSideExpression=' + getFieldValue( 'rightSideExpression' ) +
'&rightSideDescription=' + getFieldValue( 'rightSideDescription' ) );
-
+ */
+
+ $.post("validateValidationRule.action",
+ {
+ name:getFieldValue( 'name' ),
+ operator:getFieldValue( 'operator' ),
+ leftSideExpression : getFieldValue( 'leftSideExpression' ),
+ leftSideDescription : getFieldValue( 'leftSideDescription' ),
+ rightSideExpression : getFieldValue( 'rightSideExpression' ),
+ rightSideDescription : getFieldValue( 'rightSideDescription' )
+ },
+ function (data)
+ {
+ addValidationCompleted(data);
+ },'xml');
+
return false;
}
@@ -87,6 +115,7 @@
function validateUpdateValidationRule()
{
+ /*
var request = new Request();
request.setResponseTypeXML( 'message' );
request.setCallbackSuccess( updateValidationCompleted );
@@ -97,7 +126,22 @@
'&leftSideDescription=' + getFieldValue( 'leftSideDescription' ) +
'&rightSideExpression=' + getFieldValue( 'rightSideExpression' ) +
'&rightSideDescription=' + getFieldValue( 'rightSideDescription' ) );
-
+ */
+ $.post("validateValidationRule.action",
+ {
+ name:getFieldValue( 'name' ),
+ operator:getFieldValue( 'operator' ),
+ leftSideExpression : getFieldValue( 'leftSideExpression' ),
+ leftSideDescription : getFieldValue( 'leftSideDescription' ),
+ rightSideExpression : getFieldValue( 'rightSideExpression' ),
+ rightSideDescription : getFieldValue( 'rightSideDescription' )
+ },
+ function (data)
+ {
+ updateValidationCompleted(data);
+ },'xml');
+
+
return false;
}