=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/llgroup/AddLineListGroupAction.java' --- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/llgroup/AddLineListGroupAction.java 2010-10-20 06:14:25 +0000 +++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/llgroup/AddLineListGroupAction.java 2010-11-03 13:40:15 +0000 @@ -39,6 +39,7 @@ import org.hisp.dhis.linelisting.LineListElement; import org.hisp.dhis.linelisting.LineListGroup; import org.hisp.dhis.linelisting.LineListService; +import org.hisp.dhis.period.OnChangePeriodType; import org.hisp.dhis.period.PeriodService; import org.hisp.dhis.period.PeriodStore; import org.hisp.dhis.period.PeriodType; @@ -154,7 +155,10 @@ // --------------------------------------------------------------------- // Create Line List Group // --------------------------------------------------------------------- - PeriodType periodType = periodService.getPeriodTypeByName( periodTypeSelect ); + PeriodType periodType = new OnChangePeriodType(); + + System.out.println("Period Type is :" + periodType + "PeriodType Select is:" + periodTypeSelect); + LineListGroup lineListGroup = new LineListGroup( name, shortName, description, periodType ); List columnNames = new ArrayList(); === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/llgroup/UpdateLineListGroupAction.java' --- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/llgroup/UpdateLineListGroupAction.java 2010-10-20 06:14:25 +0000 +++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/llgroup/UpdateLineListGroupAction.java 2010-11-03 13:40:15 +0000 @@ -35,6 +35,7 @@ import org.hisp.dhis.linelisting.LineListElement; import org.hisp.dhis.linelisting.LineListGroup; import org.hisp.dhis.linelisting.LineListService; +import org.hisp.dhis.period.OnChangePeriodType; import org.hisp.dhis.period.PeriodService; import org.hisp.dhis.period.PeriodType; @@ -199,35 +200,16 @@ lineListGroup.getLineListElements().addAll( updatedDataElementList ); - // if ( !( removeElementList.isEmpty()) && !( newElements.isEmpty() ) ) - - - // if ( !( removeElementList.isEmpty()) || !( newElements.isEmpty() ) ) - // { - - // boolean dataUpdated = dataBaseManagerInterface.updateTable( lineListGroup.getShortName(), removeElementList, newElements ); - // if ( dataUpdated ) - // { - - // if ( lineListGroup != null ) - // { - - lineListGroup.setName( name ); - lineListGroup.setShortName( shortName ); - lineListGroup.setDescription( description ); - - PeriodType periodType = periodService.getPeriodTypeByName( periodTypeSelect ); - lineListGroup.setPeriodType( periodService.getPeriodTypeByClass( periodType.getClass() ) ); - - lineListService.updateLineListGroup( lineListGroup ); - /* - System.out.println("Line List Group name is : " + lineListGroup.getName() ); - System.out.println("Line List Group Short name is : " + lineListGroup.getShortName() ); - System.out.println("Line List Group Desc is : " + lineListGroup.getDescription() ); - */ - // } - //} - // } + lineListGroup.setName( name ); + lineListGroup.setShortName( shortName ); + lineListGroup.setDescription( description ); + + PeriodType periodType = new OnChangePeriodType(); + + lineListGroup.setPeriodType( periodService.getPeriodTypeByClass( periodType.getClass() ) ); + + lineListService.updateLineListGroup( lineListGroup ); + return SUCCESS; } === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/addLineListGroupForm.vm' --- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/addLineListGroupForm.vm 2010-10-20 06:14:25 +0000 +++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/addLineListGroupForm.vm 2010-11-03 13:40:15 +0000 @@ -16,16 +16,6 @@ - - - - - - === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/updateLineListGroupForm.vm' --- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/updateLineListGroupForm.vm 2010-10-20 06:14:25 +0000 +++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/updateLineListGroupForm.vm 2010-11-03 13:40:15 +0000 @@ -20,16 +20,6 @@ - - - - - -