dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14391
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4881: Remove chain from India Module
------------------------------------------------------------
revno: 4881
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-10-07 17:55:01 +0530
message:
Remove chain from India Module
modified:
local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListGroup.java
local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/FormAction.java
local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java
local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/HibernateLLDataValueStore.java
local/in/dhis-web-dataentry-linelisting/src/main/resources/META-INF/dhis/beans.xml
local/in/dhis-web-dataentry-linelisting/src/main/resources/org/hisp/dhis/den/i18n_module.properties
local/in/dhis-web-dataentry-linelisting/src/main/resources/struts.xml
local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/form.vm
local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/select.vm
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetExpressionAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetFilteredLineListElementsAction.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/SelectAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/GetLineListElementAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/GetLineListElementOptionsAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/LineListElementListAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/LineListOptionListAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/DefineLLGroupAssociationsAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/GetLLGroupAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/LineListElementListFilteredByGroup.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/LineListGroupElementListAction.java
local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/SetupAssociationsTreeAction.java
local/in/dhis-web-linelisting-in/src/main/resources/META-INF/dhis/beans.xml
local/in/dhis-web-linelisting-in/src/main/resources/struts.xml
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/lineListGroupAssociations.vm
local/in/dhis-web-reports-national/src/main/resources/struts.xml
local/in/dhis-web-survey/src/main/resources/struts.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 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListGroup.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListGroup.java 2011-04-27 17:15:13 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListGroup.java 2011-10-07 12:25:01 +0000
@@ -166,6 +166,36 @@
}
// -------------------------------------------------------------------------
+ // Logic
+ // -------------------------------------------------------------------------
+
+ public void addOrganisationUnit( OrganisationUnit unit )
+ {
+ sources.add( unit );
+ }
+
+ public void removeOrganisationUnit( OrganisationUnit unit )
+ {
+ sources.remove( unit );
+ }
+
+ public void updateOrganisationUnits( Set<OrganisationUnit> updates )
+ {
+ for ( OrganisationUnit unit : new HashSet<OrganisationUnit>( sources ) )
+ {
+ if ( !updates.contains( unit ) )
+ {
+ removeOrganisationUnit( unit );
+ }
+ }
+
+ for ( OrganisationUnit unit : updates )
+ {
+ addOrganisationUnit( unit );
+ }
+ }
+
+ // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/FormAction.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/FormAction.java 2011-04-27 17:15:13 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/FormAction.java 2011-10-07 12:25:01 +0000
@@ -27,6 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -37,12 +38,16 @@
import java.util.Set;
import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategory;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.dataelement.DataElementCategoryService;
import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.dataentryform.DataEntryForm;
import org.hisp.dhis.datalock.DataSetLockService;
import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.dataset.Section;
+import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
import org.hisp.dhis.datavalue.DataValue;
import org.hisp.dhis.den.api.LLDataSets;
import org.hisp.dhis.den.api.LLDataValue;
@@ -53,6 +58,7 @@
import org.hisp.dhis.minmax.MinMaxDataElement;
import org.hisp.dhis.minmax.MinMaxDataElementService;
import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.period.CalendarPeriodType;
import org.hisp.dhis.period.Period;
import com.opensymphony.xwork2.Action;
@@ -84,7 +90,7 @@
}
@SuppressWarnings("unused")
- private DataElementCategoryService dataElementCategoryService;
+ private DataElementCategoryService dataElementCategoryService;
public void setDataElementCategoryService( DataElementCategoryService dataElementCategoryService )
{
@@ -125,7 +131,17 @@
{
this.i18n = i18n;
}
+
+ //SelectAction Source Code
+ private DataSetService dataSetService;
+ public void setDataSetService( DataSetService dataSetService )
+ {
+ this.dataSetService = dataSetService;
+ }
+
+
+
// -------------------------------------------------------------------------
// Output
// -------------------------------------------------------------------------
@@ -134,8 +150,8 @@
public List<String> getRecordNos()
{
- return recordNos;
- }
+ return recordNos;
+ }
private List<OrganisationUnit> orgUnitChildList;
@@ -267,47 +283,47 @@
private String lldeath;
- public String getLldeath()
- {
- return lldeath;
- }
-
- private String llmdeath;
-
- public String getLlmdeath()
- {
- return llmdeath;
- }
-
- private String lluuidspe;
-
- public String getLluuidspe()
- {
- return lluuidspe;
- }
-
- private String lluuidspep;
-
- public String getLluuidspep()
- {
- return lluuidspep;
- }
-
- private String lldidsp;
-
- public String getLldidsp()
- {
- return lldidsp;
- }
-
- private String llidspl;
-
- public String getLlidspl()
- {
- return llidspl;
- }
+ public String getLldeath()
+ {
+ return lldeath;
+ }
+
+ private String llmdeath;
+
+ public String getLlmdeath()
+ {
+ return llmdeath;
+ }
+
+ private String lluuidspe;
+
+ public String getLluuidspe()
+ {
+ return lluuidspe;
+ }
+
+ private String lluuidspep;
+
+ public String getLluuidspep()
+ {
+ return lluuidspep;
+ }
+
+ private String lldidsp;
+
+ public String getLldidsp()
+ {
+ return lldidsp;
+ }
+
+ private String llidspl;
+
+ public String getLlidspl()
+ {
+ return llidspl;
+ }
- private int maxRecordNo;
+ private int maxRecordNo;
public int getMaxRecordNo()
{
@@ -320,7 +336,79 @@
{
return locked;
}
-
+
+ //SelectAction Source Code
+
+ private OrganisationUnit organisationUnit;
+
+ public OrganisationUnit getOrganisationUnit()
+ {
+ return organisationUnit;
+ }
+
+ private List<DataSet> dataSets = new ArrayList<DataSet>();
+
+ public Collection<DataSet> getDataSets()
+ {
+ return dataSets;
+ }
+
+ private Boolean haveSection;
+
+ public Boolean getHaveSection()
+ {
+ return haveSection;
+ }
+
+
+ private List<Period> periods = new ArrayList<Period>();
+
+ public Collection<Period> getPeriods()
+ {
+ return periods;
+ }
+
+ private String selStartDate;
+
+ public String getSelStartDate()
+ {
+ return selStartDate;
+ }
+
+ private String selEndDate;
+
+ public String getSelEndDate()
+ {
+ return selEndDate;
+ }
+
+ private Boolean customDataEntryFormExists;
+
+ public Boolean getCustomDataEntryFormExists()
+ {
+ return this.customDataEntryFormExists;
+ }
+
+
+ private String useSectionForm;
+
+ public String getUseSectionForm()
+ {
+ return useSectionForm;
+ }
+
+ public void setUseSectionForm( String useSectionForm )
+ {
+ this.useSectionForm = useSectionForm;
+ }
+/*
+ private static final String DEFAULT_FORM = "defaultform";
+
+ private static final String MULTI_DIMENSIONAL_FORM = "multidimensionalform";
+
+ private static final String SECTION_FORM = "sectionform";
+ */
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -328,6 +416,183 @@
public String execute()
throws Exception
{
+
+ //SelectAction Source Code
+
+ // ---------------------------------------------------------------------
+ // Validate selected OrganisationUnit
+ // ---------------------------------------------------------------------
+
+ organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
+
+ if ( organisationUnit == null )
+ {
+ selectedDataSetId = null;
+ selectedPeriodIndex = null;
+
+ selectedStateManager.clearSelectedDataSet();
+ selectedStateManager.clearSelectedPeriod();
+
+ return SUCCESS;
+ }
+
+ // ---------------------------------------------------------------------
+ // Load DataSets
+ // ---------------------------------------------------------------------
+
+ dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
+ //dataSets = new ArrayList<DataSet>( dataSetService.getDataSetsBySource( organisationUnit ) );
+
+ // ---------------------------------------------------------------------
+ // Remove DataSets which don't have a CalendarPeriodType or are locked
+ // ---------------------------------------------------------------------
+
+ Iterator<DataSet> it = dataSets.iterator();
+
+ while ( it.hasNext() )
+ {
+ DataSet temp = it.next();
+
+ if(temp.getName().equalsIgnoreCase( LLDataSets.LL_IDSP_LAB ) || temp.getName().equalsIgnoreCase( LLDataSets.LL_DEATHS_IDSP ) || temp.getName().equalsIgnoreCase( LLDataSets.LL_UU_IDSP_EVENTSP ) || temp.getName().equalsIgnoreCase( LLDataSets.LL_BIRTHS ) || temp.getName().equalsIgnoreCase( LLDataSets.LL_DEATHS ) || temp.getName().equalsIgnoreCase( LLDataSets.LL_MATERNAL_DEATHS ) || temp.getName().equalsIgnoreCase( LLDataSets.LL_UU_IDSP_EVENTS ))
+ {
+ if ( !( temp.getPeriodType() instanceof CalendarPeriodType ) )
+ {
+ it.remove();
+ }
+ }
+ else
+ {
+ it.remove();
+ }
+ }
+
+ Collections.sort( dataSets, new DataSetNameComparator() );
+
+ // ---------------------------------------------------------------------
+ // Validate selected DataSet
+ // ---------------------------------------------------------------------
+
+ DataSet selectedDataSet;
+
+ if ( selectedDataSetId != null )
+ {
+ selectedDataSet = dataSetService.getDataSet( selectedDataSetId );
+ }
+ else
+ {
+ selectedDataSet = selectedStateManager.getSelectedDataSet();
+ }
+
+ if ( selectedDataSet != null && dataSets.contains( selectedDataSet ) )
+ {
+ selectedDataSetId = selectedDataSet.getId();
+ selectedStateManager.setSelectedDataSet( selectedDataSet );
+ }
+ else
+ {
+ selectedDataSetId = null;
+ selectedPeriodIndex = null;
+
+ selectedStateManager.clearSelectedDataSet();
+ selectedStateManager.clearSelectedPeriod();
+
+ return SUCCESS;
+ }
+
+ // ---------------------------------------------------------------------
+ // Prepare for multidimensional dataentry
+ // ---------------------------------------------------------------------
+
+ //List<Section> sections = (List<Section>) sectionService.getSectionByDataSet( selectedDataSet );
+
+ List<Section> sections = new ArrayList<Section>();
+
+ haveSection = sections.size() != 0;
+
+ int numberOfTotalColumns = 1;
+
+ if ( selectedDataSet.getDataElements().size() > 0 )
+ {
+ for( DataElement de : selectedDataSet.getDataElements() )
+ {
+ for ( DataElementCategory category : de.getCategoryCombo().getCategories() )
+ {
+ numberOfTotalColumns = numberOfTotalColumns * category.getCategoryOptions().size();
+ }
+
+ if( numberOfTotalColumns > 1 )
+ {
+ break;
+ }
+ }
+
+ }
+
+ // ---------------------------------------------------------------------
+ // Generate Periods
+ // ---------------------------------------------------------------------
+
+ periods = selectedStateManager.getPeriodList();
+
+ // ---------------------------------------------------------------------
+ // Validate selected Period
+ // ---------------------------------------------------------------------
+
+ if ( selectedPeriodIndex == null )
+ {
+ selectedPeriodIndex = selectedStateManager.getSelectedPeriodIndex();
+ System.out.println("Period is null");
+ }
+
+ if ( selectedPeriodIndex != null && selectedPeriodIndex >= 0 && selectedPeriodIndex < periods.size() )
+ {
+ Period selPeriod = periods.get( selectedPeriodIndex );
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+ selStartDate = simpleDateFormat.format( selPeriod.getStartDate() );
+ selEndDate = simpleDateFormat.format( selPeriod.getEndDate() );
+
+ selectedStateManager.setSelectedPeriodIndex( selectedPeriodIndex );
+ }
+ else
+ {
+ selectedPeriodIndex = null;
+ selectedStateManager.clearSelectedPeriod();
+
+ return SUCCESS;
+ }
+
+ // ---------------------------------------------------------------------
+ // Get the custom data entry form (if any)
+ // ---------------------------------------------------------------------
+
+ // Locate custom data entry form belonging to dataset, if any.
+
+ //DataEntryForm dataEntryForm = selectedDataSet.getDataEntryForm();
+
+ //dataEntryFormService.getDataEntryFormByDataSet( selectedDataSet );
+
+
+ /*
+ customDataEntryFormExists = ( dataEntryForm != null);
+
+ if ( useSectionForm != null )
+ {
+ return SECTION_FORM;
+ }
+
+ if ( numberOfTotalColumns > 1 )
+ {
+ return MULTI_DIMENSIONAL_FORM;
+ }
+ else
+ {
+ return DEFAULT_FORM;
+ }
+ */
+ // }
+
+ // FormAction Source Code
+
//Intialization
llbirth = LLDataSets.LL_BIRTHS;
lldeath = LLDataSets.LL_DEATHS;
=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java 2011-04-27 17:15:13 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java 2011-10-07 12:25:01 +0000
@@ -224,6 +224,11 @@
public String execute()
throws Exception
{
+
+
+
+
+
// ---------------------------------------------------------------------
// Validate selected OrganisationUnit
// ---------------------------------------------------------------------
=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/HibernateLLDataValueStore.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/HibernateLLDataValueStore.java 2011-04-27 17:15:13 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/HibernateLLDataValueStore.java 2011-10-07 12:25:01 +0000
@@ -2375,7 +2375,7 @@
return deValueMap;
}
-
+ /*
public void removeLLRecord( int recordNo )
{
//Connection con = sessionFactory.getCurrentSession().connection();
@@ -2413,4 +2413,18 @@
}
}
}
+ */
+ public void removeLLRecord( int recordNo )
+ {
+ String query = "DELETE from lldatavalue WHERE recordno = " + recordNo;
+
+ try
+ {
+ jdbcTemplate.update( query );
+ }
+ catch ( Exception e )
+ {
+ System.out.println( "SQL Exception while deleting : " + e.getMessage() );
+ }
+ }
}
=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-web-dataentry-linelisting/src/main/resources/META-INF/dhis/beans.xml 2011-04-27 17:15:13 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/resources/META-INF/dhis/beans.xml 2011-10-07 12:25:01 +0000
@@ -101,7 +101,9 @@
<property name="dataElementCategoryService"
ref="org.hisp.dhis.dataelement.DataElementCategoryService"/>
<property name="dataSetLockService"
- ref="org.hisp.dhis.datalock.DataSetLockService"/>
+ ref="org.hisp.dhis.datalock.DataSetLockService"/>
+ <property name="dataSetService"
+ ref="org.hisp.dhis.dataset.DataSetService"/>
</bean>
<bean id="org.hisp.dhis.den.action.multidimensional.FormAction"
=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/resources/org/hisp/dhis/den/i18n_module.properties'
--- local/in/dhis-web-dataentry-linelisting/src/main/resources/org/hisp/dhis/den/i18n_module.properties 2010-09-23 07:04:57 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/resources/org/hisp/dhis/den/i18n_module.properties 2011-10-07 12:25:01 +0000
@@ -30,7 +30,8 @@
close = Close
organisation_unit = Organisation Unit
data_set = Data Set
-select = Select
+select_ds = Select Data Set
+select_period = Select Period
change_order = Change Order
period = Period
earlier_periods = Earlier periods
=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/resources/struts.xml'
--- local/in/dhis-web-dataentry-linelisting/src/main/resources/struts.xml 2011-04-27 17:15:13 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/resources/struts.xml 2011-10-07 12:25:01 +0000
@@ -12,19 +12,6 @@
<result name="success" type="redirect">select.action</result>
</action>
- <action name="select" class="org.hisp.dhis.den.action.SelectAction">
- <interceptor-ref name="organisationUnitTreeStack"/>
- <result name="defaultform" type="chain">defaultform</result>
- <result name="sectionform" type="chain">sectionform</result>
- <result name="multidimensionalform" type="chain">multidimensionalform</result>
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-dataentry-national/select.vm</param>
- <param name="menu">/dhis-web-dataentry-national/menu.vm</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/calendar.js,javascript/calendar-lang.js,javascript/calendar-setup.js,javascript/general.js,javascript/form.js</param>
- <!--<param name="javascripts">../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js</param>-->
- <param name="stylesheets">style/dhis-web-dataentry-national.css,style/custom_data_entry_form_styles.css</param>
- </action>
-
<action name="nextPeriods" class="org.hisp.dhis.den.action.NextPeriodsAction">
<result name="success" type="redirect">select.action</result>
</action>
@@ -32,8 +19,8 @@
<action name="previousPeriods" class="org.hisp.dhis.den.action.PreviousPeriodsAction">
<result name="success" type="redirect">select.action</result>
</action>
-
- <action name="defaultform" class="org.hisp.dhis.den.action.FormAction">
+
+ <action name="select" class="org.hisp.dhis.den.action.FormAction">
<interceptor-ref name="organisationUnitTreeStack"/>
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-dataentry-national/form.vm</param>
@@ -42,25 +29,7 @@
<!-- <param name="javascripts">../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js</param>-->
<param name="stylesheets">style/dhis-web-dataentry-national.css,style/custom_data_entry_form_styles.css</param>
</action>
-
- <action name="sectionform" class="org.hisp.dhis.den.action.SectionFormAction">
- <interceptor-ref name="organisationUnitTreeStack"/>
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-dataentry-national/setionform.vm</param>
- <param name="menu">/dhis-web-dataentry-national/menu.vm</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js</param>
- <param name="stylesheets">style/dhis-web-dataentry-national.css</param>
- </action>
-
- <action name="multidimensionalform" class="org.hisp.dhis.den.action.multidimensional.FormAction">
- <interceptor-ref name="organisationUnitTreeStack"/>
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-dataentry-national/multidimensional/form.vm</param>
- <param name="menu">/dhis-web-dataentry-national/menu.vm</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/multidimensional.js,javascript/form.js</param>
- <param name="stylesheets">style/dhis-web-dataentry-national.css,style/custom_data_entry_form_styles.css</param>
- </action>
-
+
<action name="saveMultiDimensionalValue" class="org.hisp.dhis.den.action.multidimensional.SaveValueAction">
<!--<interceptor-ref name="transactionStack"/> -->
<result name="success" type="velocity">status.vm</result>
=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/form.vm'
--- local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/form.vm 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/form.vm 2011-10-07 12:25:01 +0000
@@ -1,26 +1,9 @@
-<script>
- customDataEntryFormExists = "false";
- #if ( $customDataEntryFormExists)
- customDataEntryFormExists = "true";
- #end
-</script>
+
#parse( "/dhis-web-dataentry-national/select.vm" )
-#if ( $customDataEntryFormExists && !$useDefaultForm )
-
- ##foreach( $optionCombo in $optionCombos )
- #foreach( $optionCombo in $orderdCategoryOptionCombos )
-
- <td>
- <span id="value[option$optionCombo.id].name" style="display:none">$optionComboNames.get( $optionCombo.id )</span>
- </td>
-
- #end
-
- $customDataEntryFormCode
-
-#elseif($selDSName.equals($llbirth))
+
+#if($selDSName.equals($llbirth))
#parse( "/dhis-web-dataentry-national/llbirthForm.vm" )
#elseif($selDSName.equals($lldeath))
#parse( "/dhis-web-dataentry-national/lldeathForm.vm" )
@@ -36,147 +19,5 @@
#parse( "/dhis-web-dataentry-national/llidspl.vm" )
#else
-
-<table class="mainPageTable">
- <col id="noCol">
- <col id="deCol">
- <col id="minCol">
- <col id="entryCol">
- <col id="maxCol">
- <col id="commentCol">
- <!--
- <col>
- <col>
- -->
- <tr>
- <th>$i18n.getString( "nr" )</th>
- <th>$i18n.getString( "data_element" )</th>
- <th style="display:none">$i18n.getString( "type" )</th>
- <th>$i18n.getString( "min" )</th>
- <th>$i18n.getString( "entry" )</th>
- <th>$i18n.getString( "max" )</th>
- <th>$i18n.getString( "comment" )</th>
- <!--<th>$i18n.getString( "timestamp" )</th>-->
- <!--<th>$i18n.getString( "stored_by" )</th>-->
- </tr>
-#set( $count = 0 )
-#set( $mark = 0 )
-#set( $tabIndex = 1 )
-#foreach( $dataElement in $orderedDataElements )
- #set( $count = $count + 1 )
- #if( $mark == 1 )
- #set( $mark = 0 )
- #else
- #set( $mark = 1 )
- #end
- #set( $dataValue = false )
- #set( $dataValue = $dataValueMap.get( $dataElement.id ) )
- #set( $calculatedValue = false )
- #set( $calculatedValue = $calculatedValueMap.get( $dataElement ) )
- #set( $minMax = false )
- #set( $minMax = $minMaxMap.get( $dataElement.id ) )
- #set( $calculated = false )
- #set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
- <tr #if( $mark == 0 ) style="background-color:#dddddd" #end>
- ##count
- <td style="text-align:right">$count</td>
-
- ##data element name
- <td>
- <span id="value[$dataElement.id].name" title="$!encoder.htmlEncode( $dataElement.description )">
- #if( $dataElement.type == "int" && $auth.hasAccess( "dhis-web-dataentry", "viewHistory" ) )
- <a href="javascript:viewHistory( $dataElement.id )">
- #end
- #if( $useShortName )
- $encoder.htmlEncode( $dataElement.shortName )
- #else
- $encoder.htmlEncode( $dataElement.name )
- #end
- #if( $dataElement.type == "int" && $auth.hasAccess( "dhis-web-dataentry", "viewHistory" ) )
- </a>
- #end
- </span>
- </td>
-
- ##type
- <td style="display:none">$dataElementTypeMap.get( $dataElement.type )<span id="value[$dataElement.id].type" style="display:none">$dataElement.type</span></td>
-
- ##min value
- <td>
- #if( $dataElement.type == "int" )
- <div id="value[$dataElement.id].min" style="text-align:center">$!minMax.min</div>
- #end
- </td>
-
- ##entry
- <td>
- #if( $dataElement.type == "bool" )
- <select name="entryselect" id="value[$dataElement.id].boolean" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id )" #else disabled="disabled" #end style="width:100%" tabindex="$tabIndex">
- <option value="">[$i18n.getString( "no_value" )]</option>
- <option value="true" #if( $datavalue && $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
- <option value="false" #if( $datavalue && $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
- </select>
- #else
- #set( $minMaxError = false )
- #if( $dataElement.type == "int" && $dataValue && $minMax && !$calculated )
- #if( $integer.parseInt( $dataValue.value ) < $minMax.min || $integer.parseInt( $dataValue.value ) > $minMax.max )
- #set( $minMaxError = true )
- #end
- #end
- #if ( $calculated )
- <input name="entryfield" id="value[$dataElement.id].value" class="calculated" type="text" value="#if($dataValue) $!encoder.htmlEncode( $dataValue.value ) #elseif( $calculatedValue )$!encoder.htmlEncode( $calculatedValue ) #end" disabled="disabled" onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end">
- #else
- <input name="entryfield" id="value[$dataElement.id].value" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, '$encoder.jsEncode( $dataElement.name )' )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex">
- #end
- #end
- </td>
-
- ##max value
- <td>
- #if( $dataElement.type == "int" )
- <div id="value[$dataElement.id].max" style="text-align:center">$!minMax.max</div>
- #end
- </td>
-
- ##comment
- <td>
- <select id="value[$dataElement.id].comments" #if( $auth.hasAccess( "dhis-web-dataentry", "saveComment" )) onchange="commentSelected( $dataElement.id )" #else disabled="disabled" #end #if( $dataValue.comment && !$standardComments.contains( $dataValue.comment )) style="display:none; width:100%" #end>
- <option value="">[$i18n.getString( "no_comment" )]</option>
- <option value="custom">[$i18n.getString( "custom_comment" )]</option>
- #foreach( $comment in $standardComments )
- <option value="$encoder.htmlEncode( $comment )" #if( $datavalue.comment && $comment == $dataValue.comment ) selected="selected" #end>$encoder.htmlEncode( $comment )</option>
- #end
- </select>
- <input id="value[$dataElement.id].comment" type="text" value="$!encoder.htmlEncode( $dataValue.comment )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveComment" ))
- onblur="commentLeft( $dataElement.id )" #else disabled="disabled" #end style="width:100% #if( !$dataValue.comment || $standardComments.contains( $dataValue.comment )) ;display:none #end">
- </td>
- <!--<td><span id="value[$dataElement.id].timestamp">#if( $dataValue.timestamp ) $format.formatDateTime( $dataValue.timestamp ) #end</span></td>-->
- <!--<td><span id="value[$dataElement.id].storedBy">$!encoder.htmlEncode( $dataValue.storedBy )</span></td>-->
- </tr>
- #set( $tabIndex = $tabIndex + 1 )
-#end
-</table>
-#end
-
-<script type="text/javascript">
- var i18n_value_of_data_element_less = '$encoder.jsEscape( $i18n.getString( "value_of_data_element_less" ) , "'")';
- var i18n_value_of_data_element_greater = '$encoder.jsEscape( $i18n.getString( "value_of_data_element_greater" ) , "'")';
- var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
- var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';
- var i18n_saving_comment_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_comment_failed_status_code" ) , "'")';
- var i18n_saving_minmax_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_minmax_failed_error_code" ) , "'")';
- var calculatedDataElementMap = {
- #set( $count = 1 )
- #foreach( $cde in $calculatedDataElementMap.keySet() )
- #set( $innerCount = 1 )
- #set( $factorMap = $calculatedDataElementMap.get($cde) )
- $cde.id : {
- #foreach ( $de in $factorMap.keySet() )
- $de.id : $factorMap.get($de) #if ( $innerCount < $factorMap.size() ),#end
- #set( $innerCount = $innerCount + 1 )
- #end
- } #if ( $count < $calculatedDataElementMap.size() ),#end
- #set( $count = $count + 1 )
- #end
- }
-</script>
\ No newline at end of file
+ <h3>No Dataentry form available for selected DataSet/DataSet not assign to selected Organisation Unit</h3>
+#end
\ No newline at end of file
=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/select.vm'
--- local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/select.vm 2011-01-19 13:29:17 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/select.vm 2011-10-07 12:25:01 +0000
@@ -56,7 +56,7 @@
<td><label for="selectedDataSetId">$i18n.getString( "data_set" )</label></td>
<td>
<select id="selectedDataSetId" name="selectedDataSetId" style="min-width:200px" onchange="document.getElementById( 'selectForm' ).submit();" #if( $dataSets.size() == 0 ) disabled="disabled" #end>
- <option value="null">[$i18n.getString( "select" )]</option>
+ <option value="null">[$i18n.getString( "select_ds" )]</option>
#foreach( $dataSet in $dataSets )
<option value="$dataSet.id" #if( $selectedDataSetId && $dataSet.id == $selectedDataSetId ) selected="selected" #end>$encoder.htmlEncode( $dataSet.name )</option>
#end
@@ -70,7 +70,7 @@
<input type="button" value="<<" title="$i18n.getString('earlier_periods')" onclick="window.location.href='previousPeriods.action'" #if( $periods.size() == 0 ) disabled="disabled" #end>
<input type="button" value=">>" title="$i18n.getString('later_periods')" onclick="window.location.href='nextPeriods.action'" #if( $periods.size() == 0 ) disabled="disabled" #end><br>
<select id="selectedPeriodIndex" name="selectedPeriodIndex" style="min-width:200px" onchange="document.getElementById( 'selectForm' ).submit();" #if( $periods.size() == 0 ) disabled="disabled" #end>
- <option value="null">[$i18n.getString( "select" )]</option>
+ <option value="null">[$i18n.getString( "select_period" )]</option>
#foreach( $period in $periods )
#set( $index = $velocityCount - 1 )
<option value="$index" #if( $index && $selectedPeriodIndex && $index == $selectedPeriodIndex ) selected="selected" #end>$format.formatPeriod( $period )</option>
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetExpressionAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetExpressionAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetExpressionAction.java 2011-10-07 12:25:01 +0000
@@ -32,21 +32,20 @@
import java.util.Comparator;
import java.util.List;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
-
-import com.opensymphony.xwork2.ActionSupport;
import org.hisp.dhis.linelisting.LineListElement;
import org.hisp.dhis.linelisting.LineListGroup;
import org.hisp.dhis.linelisting.LineListService;
import org.hisp.dhis.linelisting.comparator.LineListGroupNameComparator;
+import com.opensymphony.xwork2.Action;
+
/**
* @author Margrethe Store
* @author Lars Helge Overland
* @version $Id: GetExpressionAction.java 5730 2008-09-20 14:32:22Z brajesh $
*/
public class GetExpressionAction
- extends ActionSupport
+ implements Action
{
// -------------------------------------------------------------------------
// Constants
@@ -84,14 +83,14 @@
// -------------------------------------------------------------------------
// DisplayPropertyHandler
// -------------------------------------------------------------------------
-
+ /*
private DisplayPropertyHandler displayPropertyHandler;
public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
{
this.displayPropertyHandler = displayPropertyHandler;
}
-
+ */
// -------------------------------------------------------------------------
// Input/output
// -------------------------------------------------------------------------
@@ -157,7 +156,8 @@
Collections.sort( llElements, lineListElementComparator );
//dataElements = displayPropertyHandler.handleDataElements( dataElements );
- displayPropertyHandler.handle( llElements );
+
+ //displayPropertyHandler.handle( llElements );
lineListGroups = new ArrayList<LineListGroup>( lineListService.getAllLineListGroups() );
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetFilteredLineListElementsAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetFilteredLineListElementsAction.java 2010-06-15 11:26:37 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llValidation/GetFilteredLineListElementsAction.java 2011-10-07 12:25:01 +0000
@@ -33,22 +33,19 @@
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.DataElementOperand;
import org.hisp.dhis.linelisting.LineListElement;
import org.hisp.dhis.linelisting.LineListService;
import org.hisp.dhis.linelisting.comparator.LineListElementNameComparator;
+import com.opensymphony.xwork2.Action;
+
/**
* @author Lars Helge Overland
* @version $Id: GetFilteredDataElementsActionIN.java 5730 2008-09-20 14:32:22Z brajesh $
*/
public class GetFilteredLineListElementsAction
- extends ActionSupport
+ implements Action
{
private static final int ALL = 0;
@@ -70,14 +67,14 @@
// -------------------------------------------------------------------------
// DisplayPropertyHandler
// -------------------------------------------------------------------------
-
+ /*
private DisplayPropertyHandler displayPropertyHandler;
public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
{
this.displayPropertyHandler = displayPropertyHandler;
}
-
+ */
// -------------------------------------------------------------------------
// Parameters
// -------------------------------------------------------------------------
@@ -130,13 +127,13 @@
//dataElements = displayPropertyHandler.handleDataElements( dataElements );
- displayPropertyHandler.handle( llElements );
+ //displayPropertyHandler.handle( llElements );
// ---------------------------------------------------------------------
// String filter
// ---------------------------------------------------------------------
- Iterator iterator = llElements.iterator();
+ Iterator<LineListElement> iterator = llElements.iterator();
while ( iterator.hasNext() )
{
=== 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 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/FormAction.java 2011-10-07 12:25:01 +0000
@@ -30,9 +30,12 @@
import org.hisp.dhis.i18n.I18n;
import com.opensymphony.xwork2.Action;
+
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -43,7 +46,9 @@
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;
@@ -86,7 +91,15 @@
{
this.i18n = i18n;
}
+
+ // source code of SelectAction
+ private LineListService lineListService;
+ public void setLineListService( LineListService lineListService )
+ {
+ this.lineListService = lineListService;
+ }
+
// --------------------------------------------------------------------------
// Parameters
// --------------------------------------------------------------------------
@@ -155,10 +168,187 @@
}
private Collection<LineListOption> lineListOptions;
-
+
+ // source code of SelectAction
+ private static final String DEFAULT_FORM = "defaultform";
+
+ private String curDate;
+
+ public String getCurDate()
+ {
+ return curDate;
+ }
+
+ private OrganisationUnit organisationUnit;
+
+ public OrganisationUnit getOrganisationUnit()
+ {
+ return organisationUnit;
+ }
+
+ private List<LineListGroup> lineListGroups = new ArrayList<LineListGroup>();
+
+ public Collection<LineListGroup> getLineListGroups()
+ {
+ return lineListGroups;
+ }
+
+ LineListGroup selectedLineListGroup;
+
+ public LineListGroup getSelectedLineListGroup()
+ {
+ return selectedLineListGroup;
+ }
+
+ private List<Period> periods = new ArrayList<Period>();
+
+ public Collection<Period> getPeriods()
+ {
+ return periods;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
public String execute() throws Exception
{
+ // source code of SelectAction
+
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+
+ curDate = simpleDateFormat.format( new Date() );
+
+ // ---------------------------------------------------------------------
+ // Validate selected OrganisationUnit
+ // ---------------------------------------------------------------------
+
+ organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
+
+ if ( organisationUnit == null )
+ {
+ selectedLineListGroupId = null;
+ selectedPeriodIndex = null;
+
+ selectedStateManager.clearSelectedLineListGroup();
+ selectedStateManager.clearSelectedPeriod();
+
+ return SUCCESS;
+ }
+
+ // ---------------------------------------------------------------------
+ // Load LineListGroups
+ // ---------------------------------------------------------------------
+ lineListGroups = selectedStateManager.loadLineListGroupsForSelectedOrgUnit( organisationUnit );
+ // lineListGroups = new ArrayList<LineListGroup>(
+ // lineListService.getLineListGroupsBySource( organisationUnit ) );
+
+ // ---------------------------------------------------------------------
+ // Remove LineListGroups which don't have a CalendarPeriodType or are
+ // locked
+ // ---------------------------------------------------------------------
+
+ Collections.sort( lineListGroups, new LineListGroupNameComparator() );
+
+ // ---------------------------------------------------------------------
+ // Validate selected LineListGroup
+ // ---------------------------------------------------------------------
+
+ // ---------------------------------------------------------------------
+ // Validate selected LineListGroup
+ // ---------------------------------------------------------------------
+
+ if ( selectedLineListGroupId != null )
+ {
+ selectedLineListGroup = lineListService.getLineListGroup( selectedLineListGroupId );
+ }
+ else
+ {
+ selectedLineListGroup = selectedStateManager.getSelectedLineListGroup();
+
+ }
+
+ if ( selectedLineListGroup != null && lineListGroups.contains( selectedLineListGroup ) )
+ {
+ selectedLineListGroupId = selectedLineListGroup.getId();
+ selectedStateManager.setSelectedLineListGroup( selectedLineListGroup );
+ }
+ else
+ {
+
+ selectedLineListGroupId = null;
+ selectedPeriodIndex = null;
+
+ selectedStateManager.clearSelectedLineListGroup();
+ selectedStateManager.clearSelectedPeriod();
+
+ return SUCCESS;
+ }
+
+ // ---------------------------------------------------------------------
+ // Prepare for multidimensional data entry
+ // ---------------------------------------------------------------------
+
+ int numberOfTotalColumns = 1;
+
+ if ( selectedLineListGroup.getLineListElements().size() > 0 )
+ {
+ for ( LineListElement de : selectedLineListGroup.getLineListElements() )
+ {
+ if ( numberOfTotalColumns > 1 )
+ {
+ break;
+ }
+ }
+ }
+
+ // ---------------------------------------------------------------------
+ // Generate Periods
+ // ---------------------------------------------------------------------
+
+ if ( selectedLineListGroup != null
+ && selectedLineListGroup.getPeriodType().getName().equalsIgnoreCase( "OnChange" ) )
+ {
+ periods = new ArrayList<Period>();
+
+ selectedPeriodIndex = null;
+ selectedStateManager.clearSelectedPeriod();
+
+ return DEFAULT_FORM;
+ // periods.add( periodService.getPeriod( 0 ) );
+ }
+ else
+ {
+ periods = selectedStateManager.getPeriodList();
+ }
+
+
+ // ---------------------------------------------------------------------
+ // Validate selected Period
+ // ---------------------------------------------------------------------
+
+ if ( selectedPeriodIndex == null )
+ {
+ selectedPeriodIndex = selectedStateManager.getSelectedPeriodIndex();
+ }
+
+ if ( selectedPeriodIndex != null && selectedPeriodIndex >= 0 && selectedPeriodIndex < periods.size() )
+ {
+ selectedStateManager.setSelectedPeriodIndex( selectedPeriodIndex );
+ }
+ else
+ {
+ selectedPeriodIndex = null;
+ selectedStateManager.clearSelectedPeriod();
+
+ return SUCCESS;
+ }
+
+ // return DEFAULT_FORM;
+
+
+
+
OrganisationUnit organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
LineListGroup lineListGroup = selectedStateManager.getSelectedLineListGroup();
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java 2010-08-14 05:19:02 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java 2011-10-07 12:25:01 +0000
@@ -43,14 +43,14 @@
import org.hisp.dhis.period.Period;
import org.hisp.dhis.period.PeriodService;
-import com.opensymphony.xwork2.ActionSupport;
+import com.opensymphony.xwork2.Action;
/**
* @author Torgeir Lorange Ostby
* @version $Id: SelectAction.java 4746 2008-03-13 20:02:29Z abyot $
*/
public class SelectAction
- extends ActionSupport
+ implements Action
{
private static final String DEFAULT_FORM = "defaultform";
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/GetLineListElementAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/GetLineListElementAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/GetLineListElementAction.java 2011-10-07 12:25:01 +0000
@@ -81,6 +81,7 @@
public String execute()
throws Exception
{
+ System.out.println("Line List Element Id is : = " + lineListElementId );
lineListElement = lineListService.getLineListElement( lineListElementId );
System.out.println("datatype = "+lineListElement.getDataType());
memberCount = lineListElement.getLineListElementOptions().size();
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/GetLineListElementOptionsAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/GetLineListElementOptionsAction.java 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/GetLineListElementOptionsAction.java 2011-10-07 12:25:01 +0000
@@ -8,7 +8,6 @@
import org.hisp.dhis.linelisting.LineListOption;
import org.hisp.dhis.linelisting.LineListService;
import org.hisp.dhis.linelisting.comparator.LineListOptionNameComparator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
import com.opensymphony.xwork2.Action;
@@ -26,14 +25,14 @@
{
this.lineListService = lineListService;
}
-
+/*
private DisplayPropertyHandler displayPropertyHandler;
public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
{
this.displayPropertyHandler = displayPropertyHandler;
}
-
+*/
// -------------------------------------------------------------------------
// Input and Output
// -------------------------------------------------------------------------
@@ -58,13 +57,37 @@
{
return availableLineListOptions;
}
+
+
+ private LineListElement lineListElement;
+ public LineListElement getLineListElement()
+ {
+ return lineListElement;
+ }
+
+ private int memberCount;
+
+ public int getMemberCount()
+ {
+ return memberCount;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
public String execute()
{
+
+ // ---------------------------------------------------------------------
+ // Get line list element
+ // ---------------------------------------------------------------------
+ lineListElement = lineListService.getLineListElement( lineListElementId );
+ System.out.println("datatype = "+lineListElement.getDataType());
+ memberCount = lineListElement.getLineListElementOptions().size();
+
+
// ---------------------------------------------------------------------
// Get line list element options
// ---------------------------------------------------------------------
@@ -77,7 +100,7 @@
//Collections.sort( lineListElementOptions, new LineListOptionNameComparator() );
- displayPropertyHandler.handle( lineListElementOptions );
+ // displayPropertyHandler.handle( lineListElementOptions );
}
// ---------------------------------------------------------------------
@@ -90,7 +113,7 @@
Collections.sort( availableLineListOptions, new LineListOptionNameComparator() );
- displayPropertyHandler.handle( availableLineListOptions );
+ //displayPropertyHandler.handle( availableLineListOptions );
return SUCCESS;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/LineListElementListAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/LineListElementListAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/LineListElementListAction.java 2011-10-07 12:25:01 +0000
@@ -34,7 +34,6 @@
import org.hisp.dhis.linelisting.LineListElement;
import org.hisp.dhis.linelisting.LineListService;
import org.hisp.dhis.linelisting.comparator.LineListElementNameComparator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
import com.opensymphony.xwork2.Action;
@@ -53,14 +52,14 @@
{
this.lineListService = lineListService;
}
-
+/*
private DisplayPropertyHandler displayPropertyHandler;
public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
{
this.displayPropertyHandler = displayPropertyHandler;
}
-
+*/
// -------------------------------------------------------------------------
// Getters & Setters
// -------------------------------------------------------------------------
@@ -81,7 +80,7 @@
Collections.sort( lineListElements, new LineListElementNameComparator() );
- displayPropertyHandler.handle( lineListElements );
+ //displayPropertyHandler.handle( lineListElements );
return SUCCESS;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/LineListOptionListAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/LineListOptionListAction.java 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llelements/LineListOptionListAction.java 2011-10-07 12:25:01 +0000
@@ -34,7 +34,6 @@
import org.hisp.dhis.linelisting.LineListOption;
import org.hisp.dhis.linelisting.LineListService;
import org.hisp.dhis.linelisting.comparator.LineListOptionNameComparator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
import com.opensymphony.xwork2.Action;
@@ -51,14 +50,14 @@
{
this.lineListService = lineListService;
}
-
+ /*
private DisplayPropertyHandler displayPropertyHandler;
public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
{
this.displayPropertyHandler = displayPropertyHandler;
}
-
+ */
// -------------------------------------------------------------------------
// Getters & Setters
// -------------------------------------------------------------------------
@@ -81,7 +80,7 @@
Collections.sort( lineListOptions, new LineListOptionNameComparator() );
- displayPropertyHandler.handle( lineListOptions );
+ // displayPropertyHandler.handle( lineListOptions );
return SUCCESS;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/DefineLLGroupAssociationsAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/DefineLLGroupAssociationsAction.java 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/DefineLLGroupAssociationsAction.java 2011-10-07 12:25:01 +0000
@@ -27,15 +27,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
import java.util.HashSet;
-import java.util.Set;
import org.hisp.dhis.linelisting.LineListGroup;
import org.hisp.dhis.linelisting.LineListService;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.oust.manager.SelectionTreeManager;
-import org.hisp.dhis.source.Source;
import com.opensymphony.xwork2.Action;
@@ -91,6 +88,14 @@
throws Exception
{
+ LineListGroup lineListGroup = lineListService.getLineListGroup( id );
+
+ lineListGroup.updateOrganisationUnits( new HashSet<OrganisationUnit>( selectionTreeManager.getReloadedSelectedOrganisationUnits() ) );
+
+ lineListService.updateLineListGroup( lineListGroup );
+
+
+ /*
Collection<OrganisationUnit> rootUnits = selectionTreeManager.getRootOrganisationUnits();
Set<OrganisationUnit> unitsInTheTree = new HashSet<OrganisationUnit>();
@@ -99,25 +104,28 @@
LineListGroup lineListGroup = lineListService.getLineListGroup( id );
- Set<Source> assignedSources = lineListGroup.getSources();
-
- assignedSources.removeAll( convert( unitsInTheTree ) );
-
+ //Set<Source> assignedSources = lineListGroup.getSources();
+ Set<OrganisationUnit> assignedSources = lineListGroup.getSources();
+
+ //assignedSources.removeAll( convert( unitsInTheTree ) );
+
+ assignedSources.removeAll( unitsInTheTree );
Collection<OrganisationUnit> selectedOrganisationUnits = selectionTreeManager.getSelectedOrganisationUnits();
- assignedSources.addAll( convert( selectedOrganisationUnits ) );
+ //assignedSources.addAll( convert( selectedOrganisationUnits ) );
+ assignedSources.addAll( selectedOrganisationUnits );
lineListGroup.setSources( assignedSources );
lineListService.updateLineListGroup( lineListGroup );
-
+ */
return SUCCESS;
}
// -------------------------------------------------------------------------
// Supportive methods
// -------------------------------------------------------------------------
-
+/*
private Set<Source> convert( Collection<OrganisationUnit> organisationUnits )
{
Set<Source> sources = new HashSet<Source>();
@@ -126,7 +134,8 @@
return sources;
}
-
+*/
+ /*
private void getUnitsInTheTree( Collection<OrganisationUnit> rootUnits, Set<OrganisationUnit> unitsInTheTree )
{
for( OrganisationUnit root : rootUnits )
@@ -135,4 +144,5 @@
getUnitsInTheTree( root.getChildren(), unitsInTheTree );
}
}
+ */
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/GetLLGroupAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/GetLLGroupAction.java 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/GetLLGroupAction.java 2011-10-07 12:25:01 +0000
@@ -35,7 +35,6 @@
import org.hisp.dhis.linelisting.LineListElement;
import org.hisp.dhis.linelisting.LineListGroup;
import org.hisp.dhis.linelisting.LineListService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
import com.opensymphony.xwork2.Action;
@@ -67,13 +66,14 @@
this.lineListService = lineListService;
}
-
+/*
private DisplayPropertyHandler displayPropertyHandler;
public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
{
this.displayPropertyHandler = displayPropertyHandler;
}
+ */
/*
private DataEntryFormService dataEntryFormService;
@@ -134,7 +134,7 @@
//Collections.sort( llElements, new LineListElementNameComparator() );
- displayPropertyHandler.handle( llElements );
+ // displayPropertyHandler.handle( llElements );
//dataEntryForm = dataEntryFormService.getDataEntryFormByDataSet( lineListGroup );
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/LineListElementListFilteredByGroup.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/LineListElementListFilteredByGroup.java 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/LineListElementListFilteredByGroup.java 2011-10-07 12:25:01 +0000
@@ -34,7 +34,6 @@
import org.hisp.dhis.linelisting.LineListElement;
import org.hisp.dhis.linelisting.LineListGroup;
import org.hisp.dhis.linelisting.LineListService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
import org.hisp.dhis.period.PeriodStore;
import org.hisp.dhis.period.PeriodType;
@@ -67,14 +66,14 @@
{
this.periodStore = periodStore;
}
-
+ /*
private DisplayPropertyHandler displayPropertyHandler;
public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
{
this.displayPropertyHandler = displayPropertyHandler;
}
-
+ */
// -------------------------------------------------------------------------
// Getters & Setters
// -------------------------------------------------------------------------
@@ -210,7 +209,7 @@
//Collections.sort( lineListElements, new LineListElementNameComparator() );
- displayPropertyHandler.handle( lineListElements );
+ //displayPropertyHandler.handle( lineListElements );
return SUCCESS;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/LineListGroupElementListAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/LineListGroupElementListAction.java 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/LineListGroupElementListAction.java 2011-10-07 12:25:01 +0000
@@ -31,7 +31,6 @@
import org.hisp.dhis.linelisting.LineListElement;
import org.hisp.dhis.linelisting.LineListService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
import org.hisp.dhis.period.PeriodStore;
import org.hisp.dhis.period.PeriodType;
@@ -52,13 +51,14 @@
{
this.lineListService = lineListService;
}
-
+ /*
private DisplayPropertyHandler displayPropertyHandler;
public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
{
this.displayPropertyHandler = displayPropertyHandler;
}
+ */
/*
private PeriodService periodService;
@@ -109,7 +109,7 @@
//Collections.sort( lineListElements, new LineListElementNameComparator() );
- displayPropertyHandler.handle( lineListElements );
+ // displayPropertyHandler.handle( lineListElements );
return SUCCESS;
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/SetupAssociationsTreeAction.java'
--- local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/SetupAssociationsTreeAction.java 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/java/org/hisp/dhis/ll/action/llgroup/SetupAssociationsTreeAction.java 2011-10-07 12:25:01 +0000
@@ -27,15 +27,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
import org.hisp.dhis.linelisting.LineListGroup;
import org.hisp.dhis.linelisting.LineListService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.oust.manager.SelectionTreeManager;
-import org.hisp.dhis.source.Source;
import com.opensymphony.xwork2.Action;
@@ -109,15 +103,15 @@
System.out.println("selectionTreeManager is null");
}
- selectionTreeManager.setSelectedOrganisationUnits( convert( lineListGroup.getSources() ) );
-
+ //selectionTreeManager.setSelectedOrganisationUnits( convert( lineListGroup.getSources() ) );
+ selectionTreeManager.setSelectedOrganisationUnits( lineListGroup.getSources() );
return SUCCESS;
}
// -------------------------------------------------------------------------
// Supportive methods
// -------------------------------------------------------------------------
-
+/*
private Set<OrganisationUnit> convert( Collection<Source> sources )
{
@@ -130,4 +124,5 @@
return organisationUnits;
}
+ */
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-web-linelisting-in/src/main/resources/META-INF/dhis/beans.xml 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/resources/META-INF/dhis/beans.xml 2011-10-07 12:25:01 +0000
@@ -38,9 +38,9 @@
<bean id="org.hisp.dhis.ll.action.llOption.ShowAddLineListOptionForm"
class="org.hisp.dhis.ll.action.llOption.ShowAddLineListOptionForm" scope="prototype">
- <property name="lineListService">
+<!-- <property name="lineListService">
<ref bean="org.hisp.dhis.linelisting.LineListService"/>
- </property>
+ </property>-->
</bean>
<bean id="org.hisp.dhis.ll.action.llOption.ShowUpdateLineListOptionFormAction"
@@ -261,7 +261,7 @@
</bean>
<!-- Line List source assign -->
-
+<!--
<bean id="org.hisp.dhis.ll.action.llgroup.GetNumberOfLevelsAction"
class="org.hisp.dhis.ll.action.llgroup.GetNumberOfLevelsAction"
scope="prototype">
@@ -269,7 +269,7 @@
<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
</property>
</bean>
-
+-->
<bean id="org.hisp.dhis.ll.action.llgroup.SetupAssociationsTreeAction"
class="org.hisp.dhis.ll.action.llgroup.SetupAssociationsTreeAction"
scope="prototype">
@@ -291,7 +291,7 @@
<ref bean="org.hisp.dhis.linelisting.LineListService"/>
</property>
</bean>
-
+<!--
<bean id="org.hisp.dhis.ll.action.llgroup.SelectLevelAction"
class="org.hisp.dhis.ll.action.llgroup.SelectLevelAction"
scope="prototype">
@@ -326,7 +326,7 @@
<ref bean="org.hisp.dhis.dataset.DataEntryFormService"/>
</property>
</bean>
-
+-->
<!-- Line List Data Entry -->
@@ -339,7 +339,7 @@
<ref bean="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager"/>
</property>
</bean>
-
+<!--
<bean id="org.hisp.dhis.ll.action.lldataentry.SelectAction"
class="org.hisp.dhis.ll.action.lldataentry.SelectAction" scope="prototype">
<property name="selectedStateManager">
@@ -355,9 +355,9 @@
<ref bean="org.hisp.dhis.period.PeriodService"/>
</property>
</bean>
-
+-->
<bean id="org.hisp.dhis.ll.action.lldataentry.NextPeriodsAction"
- class="org.hisp.dhis.ll.action.lldataentry.NextPeriodsAction">
+ class="org.hisp.dhis.ll.action.lldataentry.NextPeriodsAction">
<property name="selectedStateManager">
<ref bean="org.hisp.dhis.ll.action.lldataentry.SelectedStateManager"/>
</property>
@@ -371,7 +371,7 @@
</bean>
<bean id="org.hisp.dhis.ll.action.lldataentry.FormAction"
- class="org.hisp.dhis.ll.action.lldataentry.FormAction" scope="prototype">
+ class="org.hisp.dhis.ll.action.lldataentry.FormAction" scope="prototype">
<property name="selectedStateManager">
<ref bean="org.hisp.dhis.ll.action.lldataentry.SelectedStateManager"/>
</property>
@@ -381,6 +381,9 @@
<property name="periodService">
<ref bean="org.hisp.dhis.period.PeriodService"/>
</property>
+ <property name="lineListService">
+ <ref bean="org.hisp.dhis.linelisting.LineListService"/>
+ </property>
</bean>
<bean id="org.hisp.dhis.ll.action.lldataentry.SaveValueAction"
=== modified file 'local/in/dhis-web-linelisting-in/src/main/resources/struts.xml'
--- local/in/dhis-web-linelisting-in/src/main/resources/struts.xml 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/resources/struts.xml 2011-10-07 12:25:01 +0000
@@ -111,14 +111,9 @@
<!-- Show edit Line List Element form-->
-
+
+ <!--<action name="editLineListElementForm" -->
<action name="showEditLineListElementForm"
- class="org.hisp.dhis.ll.action.llelements.GetLineListElementAction">
- <result name="success" type="chain">editLineListElementForm</result>
- </action>
-
-
- <action name="editLineListElementForm"
class="org.hisp.dhis.ll.action.llelements.GetLineListElementOptionsAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-linelisting-in/editLineListElementForm.vm</param>
@@ -252,71 +247,21 @@
</action>
<!-- LLGroup association -->
-
<action name="defineLLGroupAssociationsForm"
- class="org.hisp.dhis.ll.action.llgroup.GetNumberOfLevelsAction">
- <result name="success" type="chain">defineLLGroupAssociationsFormChain</result>
- <param name="requiredAuthorities">F_LINELISTGroup_ASSIGN</param>
- </action>
-
- <action name="defineLLGroupAssociationsFormChain"
- class="org.hisp.dhis.ll.action.llgroup.SetupAssociationsTreeAction">
+ class="org.hisp.dhis.ll.action.llgroup.SetupAssociationsTreeAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-linelisting-in/lineListGroupAssociations.vm</param>
<param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/lineListGroupElements.js,javascript/associations.js</param>
<param name="requiredAuthorities">F_LINELISTGroup_ASSIGN</param>
</action>
-
+
+ <!-- LLGroup association save -->
<action name="defineLLGroupAssociations"
- class="org.hisp.dhis.ll.action.llgroup.DefineLLGroupAssociationsAction">
+ class="org.hisp.dhis.ll.action.llgroup.DefineLLGroupAssociationsAction">
<result name="success" type="redirect">getLineListGroups.action</result>
<param name="requiredAuthorities">F_LINELISTGroup_ASSIGN</param>
</action>
-
- <action name="selectLevel"
- class="org.hisp.dhis.ll.action.llgroup.SelectLevelAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- <param name="requiredAuthorities">F_LINELISTGroup_ASSIGN</param>
- </action>
-
- <action name="unselectLevel"
- class="org.hisp.dhis.ll.action.llgroup.UnselectLevelAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- <param name="requiredAuthorities">F_LINELISTGroup_ASSIGN</param>
- </action>
-
- <action name="unselectAll"
- class="org.hisp.dhis.ll.action.llgroup.UnselectAllAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- <param name="requiredAuthorities">F_LINELISTGroup_ASSIGN</param>
- </action>
-
- <action name="getNumberOfLevelsSelectLevelChain"
- class="org.hisp.dhis.ll.action.llgroup.GetNumberOfLevelsAction">
- <result name="success" type="chain">getLLGroupSelectLevelChain</result>
- <param name="requiredAuthorities">F_LINELISTGroup_ASSIGN</param>
- </action>
-
- <action name="getLLGroupSelectLevelChain"
- class="org.hisp.dhis.ll.action.llgroup.GetLLGroupAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-linelisting-in/lineListGroupAssociations.vm</param>
- <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/lineListGroupElements.js,javascript/associations.js</param>
- <param name="requiredAuthorities">F_LINELISTGroup_ASSIGN</param>
- </action>
-
- <!-- LLDataentry -->
-
- <action name="select" class="org.hisp.dhis.ll.action.lldataentry.SelectAction">
- <interceptor-ref name="organisationUnitTreeStack"/>
- <result name="defaultform" type="chain">defaultform</result>
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-linelisting-in/select.vm</param>
- <param name="menu">/dhis-web-linelisting-in/menuForLLDataEntry.vm</param>
- <param name="javascripts">../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js</param>
- <param name="stylesheets">css/dhis-web-dataentry-national.css</param>
- </action>
-
+
<action name="nextPeriods" class="org.hisp.dhis.ll.action.lldataentry.NextPeriodsAction">
<result name="success" type="redirect">select.action</result>
</action>
@@ -324,8 +269,9 @@
<action name="previousPeriods" class="org.hisp.dhis.ll.action.lldataentry.PreviousPeriodsAction">
<result name="success" type="redirect">select.action</result>
</action>
-
- <action name="defaultform" class="org.hisp.dhis.ll.action.lldataentry.FormAction">
+
+ <!--<action name="defaultform" class="org.hisp.dhis.ll.action.lldataentry.FormAction">-->
+ <action name="select" class="org.hisp.dhis.ll.action.lldataentry.FormAction">
<interceptor-ref name="organisationUnitTreeStack"/>
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-linelisting-in/form.vm</param>
=== 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 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/javascript/lineListElement.js 2011-10-07 12:25:01 +0000
@@ -13,18 +13,24 @@
function lineListElementReceived( lineListElementElement )
{
- setFieldValue( 'idField', getElementValue( lineListElementElement, 'id' ) );
-
- setFieldValue( 'nameField', getElementValue( lineListElementElement, 'name' ) );
-
- setFieldValue( 'shortNameField', getElementValue( lineListElementElement, 'shortName' ) );
-
- setFieldValue( 'dataTypeField', getElementValue( lineListElementElement, 'dataType' ) );
-
- setFieldValue( 'presentationTypeField', getElementValue( lineListElementElement, 'presentationType' ) );
-
- setFieldValue( 'memberCountField', getElementValue( lineListElementElement, 'memberCount' ) );
-
+ //setFieldValue( 'idField', getElementValue( lineListElementElement, 'id' ) );
+ setInnerHTML( 'idField', getElementValue( lineListElementElement, 'id' ) );
+
+ //setFieldValue( 'nameField', getElementValue( lineListElementElement, 'name' ) );
+ setInnerHTML( 'idField', getElementValue( lineListElementElement, 'name' ) );
+
+ // setFieldValue( 'shortNameField', getElementValue( lineListElementElement, 'shortName' ) );
+ setInnerHTML( 'idField', getElementValue( lineListElementElement, 'shortName' ) );
+
+ //setFieldValue( 'dataTypeField', getElementValue( lineListElementElement, 'dataType' ) );
+ setInnerHTML( 'idField', getElementValue( lineListElementElement, 'dataType' ) );
+
+ //setFieldValue( 'presentationTypeField', getElementValue( lineListElementElement, 'presentationType' ) );
+ setInnerHTML( 'idField', getElementValue( lineListElementElement, 'presentationType' ) );
+
+ //setFieldValue( 'memberCountField', getElementValue( lineListElementElement, 'memberCount' ) );
+ setInnerHTML( 'idField', getElementValue( lineListElementElement, 'memberCount' ) );
+
showDetails();
}
=== modified file 'local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/lineListGroupAssociations.vm'
--- local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/lineListGroupAssociations.vm 2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-linelisting-in/src/main/webapp/dhis-web-linelisting-in/lineListGroupAssociations.vm 2011-10-07 12:25:01 +0000
@@ -8,7 +8,19 @@
<input type="hidden" name="id" value="$id">
</div>
<table id="selectionTable">
- <tr>
+ <tr>
+ <td>
+ #organisationUnitSelectionTree( false, true, false )
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="submit" id="submitButton" value="$i18n.getString( "save" )" style="width:10em">
+ <input type="button" onclick="window.location.href='getLineListGroups.action'" value="$i18n.getString( "cancel" )" style="width:10em">
+ </td>
+ </tr>
+
+<!--<tr>
<td>
<input type="button" value="$i18n.getString( "remove_all" )" onclick="window.location.href='unselectAll.action?id=$id'" style="width:12em">
<input type="button" value="$i18n.getString( "select_all_at_level" )" onclick="selectAllAtLevel( $id )" style="width:12em">
@@ -41,11 +53,11 @@
<input type="submit" id="submitButton" value="$i18n.getString( "save" )" style="width:10em"><input type="button"
onclick="window.location.href='getLineListGroups.action'" value="$i18n.getString( "cancel" )" style="width:10em">
</td>
- </tr>
+ </tr>-->
</table>
</form>
-
+<!--
<span id="message"></span>
<script type="text/javascript">
@@ -54,3 +66,4 @@
var i18n_loading = '$encoder.jsEncode( $i18n.getString( "loading" ) )';
</script>
+-->
\ No newline at end of file
=== modified file 'local/in/dhis-web-reports-national/src/main/resources/struts.xml'
--- local/in/dhis-web-reports-national/src/main/resources/struts.xml 2011-07-07 08:22:34 +0000
+++ local/in/dhis-web-reports-national/src/main/resources/struts.xml 2011-10-07 12:25:01 +0000
@@ -66,18 +66,6 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <!-- Report Association -->
-<!-- <action name="defineReportAssociationsForm"
- class="org.hisp.dhis.reports.reportmanagement.action.GetNumberOfLevelsAction">
- <result name="success" type="chain">defineReportAssociationsFormChain</result>
- </action>
- <action name="defineReportAssociationsFormChain"
- class="org.hisp.dhis.reports.reportmanagement.action.SetupAssociationsTreeAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="menu">/dhis-web-reports/menu.vm</param>
- <param name="page">/dhis-web-reports/reportAssociations.vm</param>
- <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/reportManagementAssociations.js</param>
- </action>-->
<action name="defineReportAssociationsForm"
class="org.hisp.dhis.reports.reportmanagement.action.SetupAssociationsTreeAction">
<result name="success" type="velocity">/main.vm</result>
@@ -91,45 +79,6 @@
<result name="success" type="redirect">reportManagement.action</result>
</action>
- <!-- Report Association Remove All -->
-<!-- <action name="unselectAll"
- class="org.hisp.dhis.reports.reportmanagement.action.UnselectAllAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- </action>-->
-
- <!-- Report Association select/unselect All at Level -->
-<!-- <action name="selectLevel"
- class="org.hisp.dhis.reports.reportmanagement.action.SelectLevelAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- </action>
- <action name="unselectLevel"
- class="org.hisp.dhis.reports.reportmanagement.action.UnselectLevelAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- </action>-->
-
- <!-- Report Association select/unselect All at Group -->
-<!-- <action name="selectgroup"
- class="org.hisp.dhis.reports.reportmanagement.action.SelectGroupAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- </action>
- <action name="unselectgroup"
- class="org.hisp.dhis.reports.reportmanagement.action.UnselectGroupAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- </action>-->
-
- <!-- Chain for Associations -->
-<!-- <action name="getNumberOfLevelsSelectLevelChain"
- class="org.hisp.dhis.reports.reportmanagement.action.GetNumberOfLevelsAction">
- <result name="success" type="chain">getReportSelectLevelChain</result>
- </action>
- <action name="getReportSelectLevelChain"
- class="org.hisp.dhis.reports.reportmanagement.action.GetReportAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="menu">/dhis-web-reports/menu.vm</param>
- <param name="page">/dhis-web-reports/reportAssociations.vm</param>
- <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/reportManagementAssociations.js</param>
- </action>-->
-
<!-- Report Deletion -->
<action name="delReport"
class="org.hisp.dhis.reports.reportmanagement.action.DelReportAction">
=== modified file 'local/in/dhis-web-survey/src/main/resources/struts.xml'
--- local/in/dhis-web-survey/src/main/resources/struts.xml 2011-06-22 11:47:58 +0000
+++ local/in/dhis-web-survey/src/main/resources/struts.xml 2011-10-07 12:25:01 +0000
@@ -17,31 +17,7 @@
</action>
<!-- Edit Survey Form -->
-
-<!-- <action name="editSurveyForm"
- class="org.hisp.dhis.survey.action.IndicatorListFilteredByGroup">
- <result name="success" type="chain">
- <param name="actionName">indicatorGroupListEditChain</param>
- </result>-->
- <!--<param name="requiredAuthorities">F_SURVEY_UPDATE</param>-->
-<!-- </action>-->
-
-<!-- <action name="indicatorGroupListEditChain"
- class="org.hisp.dhis.survey.action.IndicatorGroupListAction">
- <result name="success" type="chain">
- <param name="actionName">getSurveyEditChain</param>
- </result>-->
- <!--<param name="requiredAuthorities">F_SURVEY_UPDATE</param>-->
-<!-- </action>-->
-<!--
- <action name="getSurveyEditChain"
- class="org.hisp.dhis.survey.action.GetSurveyAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-survey/editSurvey.vm</param>
- <param name="javascripts">javascript/survey.js,javascript/IndicatorList.js </param>-->
- <!--<param name="requiredAuthorities">F_SURVEY_UPDATE</param>-->
-<!-- </action>-->
-
+
<action name="editSurveyForm"
class="org.hisp.dhis.survey.action.GetSurveyAction">
<result name="success" type="velocity">/main.vm</result>
@@ -110,21 +86,6 @@
<!-- Survry Association -->
-<!-- <action name="defineSurveyAssociationsForm"
- class="org.hisp.dhis.survey.action.GetNumberOfLevelsAction">
- <result name="success" type="chain">
- defineSurveyAssociationsFormChain</result>-->
- <!--<param name="requiredAuthorities">F_DATASET_ASSIGN</param>-->
-<!-- </action>-->
-
-<!-- <action name="defineSurveyAssociationsFormChain"
- class="org.hisp.dhis.survey.action.SetupAssociationsTreeAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-survey/surveyAssociations.vm</param>
- <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/IndicatorList.js,javascript/associations.js</param>-->
- <!--<param name="requiredAuthorities">F_DATASET_ASSIGN</param>-->
-<!-- </action>-->
-
<action name="defineSurveyAssociationsForm"
class="org.hisp.dhis.survey.action.SetupAssociationsTreeAction">
<result name="success" type="velocity">/main.vm</result>
@@ -139,33 +100,6 @@
<result name="success" type="redirect">index.action</result>
</action>
-<!-- <action name="selectLevel"
- class="org.hisp.dhis.survey.action.SelectLevelAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- </action>
-
- <action name="unselectLevel"
- class="org.hisp.dhis.survey.action.UnselectLevelAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- </action>
-
- <action name="unselectAll"
- class="org.hisp.dhis.survey.action.UnselectAllAction">
- <result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
- </action>
-
- <action name="getNumberOfLevelsSelectLevelChain"
- class="org.hisp.dhis.survey.action.GetNumberOfLevelsAction">
- <result name="success" type="chain">getSurveySelectLevelChain</result>
- </action>
-
- <action name="getSurveySelectLevelChain"
- class="org.hisp.dhis.survey.action.GetSurveyAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-survey/surveyAssociations.vm</param>
- <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/IndicatorsList.js,javascript/associations.js</param>
- </action>
--->
<action name="getSurvey"
class="org.hisp.dhis.survey.action.GetSurveyAction">
<result name="success" type="velocity-xml">/dhis-web-survey/responseSurveyObject.vm</result>
@@ -178,48 +112,7 @@
class="org.hisp.dhis.survey.action.EmptyAction">
<result name="success" type="redirect">select.action</result>
</action>
-<!--
- <action name="select" class="org.hisp.dhis.survey.action.SelectAction">
- <interceptor-ref name="organisationUnitTreeStack"/>
- <result name="defaultform" type="chain">defaultform</result>
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-survey/select.vm</param>
- <param name="menu">/dhis-web-survey/menuWithTree.vm</param>
- <param name="menuTreeHeight">350</param>
- <param name="javascripts">
- ../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js</param>
- <param name="stylesheets">
- style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
- </action>
--->
-<!--
- <action name="select" class="org.hisp.dhis.survey.action.SelectAction">
- <interceptor-ref name="organisationUnitTreeStack"/>
- <result name="defaultform" type="redirect">
- <param name="location">defaultform.action</param>
- <param name="selectedSurveyId">${selectedSurveyId}</param>
- <param name="parse">false</param>
- </result>
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-survey/select.vm</param>
- <param name="menu">/dhis-web-survey/menuWithTree.vm</param>
- <param name="menuTreeHeight">350</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js</param>
- <param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
- </action>
--->
-<!-- <action name="select" class="org.hisp.dhis.survey.action.SelectAction">
- <interceptor-ref name="organisationUnitTreeStack"/>
- <result name="success" type="velocity">/main.vm</result>-->
- <!--<param name="page">/dhis-web-survey/select.vm</param>-->
-<!-- <param name="page">${page}</param>
- <param name="menu">/dhis-web-survey/menuWithTree.vm</param>-->
- <!--<result name="defaultform" type="velocity">/dhis-web-survey/form.vm</result>-->
-<!-- <param name="menuTreeHeight">350</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js</param>
- <param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
- </action>-->
-
+
<action name="select" class="org.hisp.dhis.survey.action.SelectAction">
<interceptor-ref name="organisationUnitTreeStack"/>
<result name="success" type="velocity">/main.vm</result>
@@ -305,21 +198,7 @@
class="org.hisp.dhis.survey.action.EmptyAction">
<result name="success" type="redirect">selectTarget.action</result>
</action>
-<!--
- <action name="selectTarget" class="org.hisp.dhis.detarget.action.SelectAction">
- <interceptor-ref name="organisationUnitTreeStack"/>
- <result name="defaulttargetform" type="chain">defaulttargetform</result>
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-survey/selectTarget.vm</param>
- <param name="menu">/dhis-web-survey/menuWithTreeForDeTarget.vm</param>
- <param name="menuTreeHeight">350</param>
- <param name="javascripts">
- ../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js</param>
- <param name="stylesheets">
- style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
- </action>
--->
-
+
<action name="selectTarget" class="org.hisp.dhis.detarget.action.SelectAction">
<interceptor-ref name="organisationUnitTreeStack"/>
<result name="success" type="velocity">/main.vm</result>
@@ -407,21 +286,6 @@
</action>
<!-- DeTarget Association -->
-
-<!-- <action name="defineDeTargetAssociationsForm"
- class="org.hisp.dhis.detarget.action.GetNumberOfLevelsAction">
- <result name="success" type="chain">defineDeTargetAssociationsFormChain</result>-->
- <!--<param name="requiredAuthorities">F_DATASET_ASSIGN</param>-->
-<!-- </action>-->
-
-<!-- <action name="defineDeTargetAssociationsFormChain"
- class="org.hisp.dhis.detarget.action.SetupAssociationsTreeAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-survey/deTargetAssociations.vm</param>
- <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/associations.js</param>-->
- <!--<param name="requiredAuthorities">F_DATASET_ASSIGN</param>-->
-<!-- </action> -->
-
<action name="defineDeTargetAssociationsForm"
class="org.hisp.dhis.detarget.action.SetupAssociationsTreeAction">
@@ -438,23 +302,7 @@
</action>
<!-- Edit DeTarget Form -->
-
-<!-- <action name="editDeTargetForm"
- class="org.hisp.dhis.detarget.action.DataElementListFilterByGroupAction">
- <result name="success" type="chain">
- <param name="actionName">deTargetGroupListEditChain</param>
- </result>
-
- </action>-->
-<!--
- <action name="deTargetGroupListEditChain"
- class="org.hisp.dhis.detarget.action.DataElementGroupListAction">
- <result name="success" type="chain">
- <param name="actionName">getDeTargetEditChain</param>
- </result>
-
- </action>-->
-
+
<action name="editDeTargetForm"
class="org.hisp.dhis.detarget.action.GetDeTargetAction">
<result name="success" type="velocity">/main.vm</result>