dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23893
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11640: Minor
------------------------------------------------------------
revno: 11640
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-08-12 19:09:10 +0200
message:
Minor
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/ExpressionUpgrader.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-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/ExpressionUpgrader.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/ExpressionUpgrader.java 2013-01-05 15:22:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/ExpressionUpgrader.java 2013-08-12 17:09:10 +0000
@@ -1,6 +1,8 @@
package org.hisp.dhis.startup;
-import static org.hisp.dhis.dataentryform.DataEntryFormService.*;
+import static org.hisp.dhis.dataentryform.DataEntryFormService.DATAELEMENT_TOTAL_PATTERN;
+import static org.hisp.dhis.dataentryform.DataEntryFormService.IDENTIFIER_PATTERN;
+import static org.hisp.dhis.dataentryform.DataEntryFormService.INDICATOR_PATTERN;
import java.util.Collection;
import java.util.regex.Matcher;
@@ -11,7 +13,6 @@
import org.hisp.dhis.constant.Constant;
import org.hisp.dhis.constant.ConstantService;
import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryCombo;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.dataelement.DataElementCategoryService;
import org.hisp.dhis.dataelement.DataElementService;
@@ -235,40 +236,6 @@
form.setHtmlCode( sb.toString() );
// ---------------------------------------------------------
- // Dynamic input
- // ---------------------------------------------------------
-
- matcher = DYNAMIC_INPUT_PATTERN.matcher( form.getHtmlCode() );
- sb = new StringBuffer();
-
- while ( matcher.find() )
- {
- DataElementCategoryOptionCombo coc = categoryService.getDataElementCategoryOptionCombo( Integer.parseInt( matcher.group( 2 ) ) );
- String replacement = matcher.group( 1 ) + "-" + coc.getUid() + "-dyninput";
- matcher.appendReplacement( sb, replacement );
- }
-
- matcher.appendTail( sb );
- form.setHtmlCode( sb.toString() );
-
- // ---------------------------------------------------------
- // Dynamic select
- // ---------------------------------------------------------
-
- matcher = DYNAMIC_SELECT_PATTERN.matcher( form.getHtmlCode() );
- sb = new StringBuffer();
-
- while ( matcher.find() )
- {
- DataElementCategoryCombo cc = categoryService.getDataElementCategoryCombo( Integer.parseInt( matcher.group( 1 ) ) );
- String replacement = "dynselect=\"" + cc.getUid() + "\"";
- matcher.appendReplacement( sb, replacement );
- }
-
- matcher.appendTail( sb );
- form.setHtmlCode( sb.toString() );
-
- // ---------------------------------------------------------
// Update format and save
// ---------------------------------------------------------