dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07959
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2359: Minor fix bug in data set
------------------------------------------------------------
revno: 2359
committer: Tri Tran Thanh <Tri Tran Thanh@compaq>
branch nick: trunk
timestamp: Wed 2010-10-13 12:33:11 +0700
message:
Minor fix bug in data set
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.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 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm 2010-10-13 04:45:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm 2010-10-13 05:33:11 +0000
@@ -198,7 +198,7 @@
function insertDataElement()
{
- var oEditor = FCKeditorAPI.GetInstance('fckeditor') ;
+ var oEditor = FCKeditorAPI.GetInstance('designTextarea') ;
var viewByValue = getFieldValue( 'viewBySelector' );
var json = JSON.parse( jQuery("#json_" + selected ).val() );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java 2010-10-13 04:45:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java 2010-10-13 05:33:11 +0000
@@ -33,11 +33,15 @@
import java.util.List;
import java.util.Set;
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategoryService;
+import org.hisp.dhis.dataelement.DataElementOperand;
import org.hisp.dhis.dataentryform.DataEntryForm;
import org.hisp.dhis.dataentryform.DataEntryFormService;
import org.hisp.dhis.editor.EditorManager;
import org.hisp.dhis.patient.screen.DataEntryManager;
import org.hisp.dhis.program.ProgramStage;
+import org.hisp.dhis.program.ProgramStageDataElementService;
import org.hisp.dhis.program.ProgramStageService;
import com.opensymphony.xwork2.Action;
@@ -88,6 +92,20 @@
this.editorManager = editorManager;
}
+ private ProgramStageDataElementService programStageDataElementService;
+
+ public void setProgramStageDataElementService( ProgramStageDataElementService programStageDataElementService )
+ {
+ this.programStageDataElementService = programStageDataElementService;
+ }
+
+ private DataElementCategoryService dataElementCategoryService;
+
+ public void setDataElementCategoryService( DataElementCategoryService dataElementCategoryService )
+ {
+ this.dataElementCategoryService = dataElementCategoryService;
+ }
+
// -------------------------------------------------------------------------
// Getters & Setters
// -------------------------------------------------------------------------
@@ -127,6 +145,13 @@
return listDataEntryForm;
}
+ public List<DataElementOperand> operands;
+
+ public List<DataElementOperand> getOperands()
+ {
+ return operands;
+ }
+
// -------------------------------------------------------------------------
// Execute
// -------------------------------------------------------------------------
@@ -146,7 +171,7 @@
}
Set<ProgramStage> listProgramStage = programStage.getProgram().getProgramStages();
- System.out.println( "listProgramStages: " + listProgramStage );
+
List<Integer> listAssociationIds = new ArrayList<Integer>();
Iterator<ProgramStage> itr = listProgramStage.iterator();
@@ -160,18 +185,21 @@
if ( dataEntryForm == null )
{
status = "ADD";
+ editorManager.setValue( "" );
}
else
{
status = "EDIT";
listDataEntryForm.remove( dataEntryForm );
- String htmlCode = dataEntryManager.prepareDataEntryFormCode( dataEntryForm.getHtmlCode() );
-
- dataEntryForm.setHtmlCode( htmlCode );
- editorManager.setValue( htmlCode );
+ editorManager.setValue( dataEntryManager.prepareDataEntryFormCode( dataEntryForm.getHtmlCode() ) );
}
+ List<DataElement> dataElements = new ArrayList<DataElement>( programStageDataElementService
+ .getListDataElement( association ) );
+
+ operands = new ArrayList<DataElementOperand>( dataElementCategoryService.getFullOperands( dataElements ) );
+
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2010-10-13 04:45:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2010-10-13 05:33:11 +0000
@@ -749,7 +749,11 @@
<property name="dataEntryManager">
<ref bean="org.hisp.dhis.patient.screen.DataEntryManager" />
</property>
- <property name="editorManager" ref="editorManager"/>
+ <property name="editorManager" ref="editorManager"/>
+ <property name="programStageDataElementService"
+ ref="org.hisp.dhis.program.ProgramStageDataElementService" />
+ <property name="dataElementCategoryService"
+ ref="org.hisp.dhis.dataelement.DataElementCategoryService" />
</bean>
<bean id="org.hisp.dhis.patient.screen.DataEntryManager" class="org.hisp.dhis.patient.screen.DefaultDataEntryManager"