← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2219: Improved add section code

 

------------------------------------------------------------
revno: 2219
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2010-11-29 17:21:11 +0100
message:
  Improved add section code
added:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionOptionsAction.java
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/AddSectionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/EditSectionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm


--
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/java/org/hisp/dhis/dataset/action/section/AddSectionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/AddSectionAction.java	2010-09-07 05:24:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/AddSectionAction.java	2010-11-29 16:21:11 +0000
@@ -27,22 +27,17 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.opensymphony.xwork2.Action;
-
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryService;
-import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataelement.comparator.DataElementGroupNameComparator;
-import org.hisp.dhis.dataelement.comparator.DataElementNameComparator;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.dataset.Section;
 import org.hisp.dhis.dataset.SectionService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
+
+import com.opensymphony.xwork2.Action;
 
 public class AddSectionAction
     implements Action
@@ -51,22 +46,12 @@
     // Variables
     // -------------------------------------------------------------------------
 
-    private Integer categoryComboId;
-
     private Integer dataSetId;
 
     private String sectionName;
 
-    private DataSet dataSet;
-
-    private DataElementCategoryCombo categoryCombo;
-
     private List<String> selectedList = new ArrayList<String>();
 
-    private List<DataElement> dataElements = new ArrayList<DataElement>();
-
-    private List<DataElementGroup> dataElementGroups;
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -78,13 +63,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private DataElementCategoryService dataElementCategoryService;
-
-    public void setDataElementCategoryService( DataElementCategoryService dataElementCategoryService )
-    {
-        this.dataElementCategoryService = dataElementCategoryService;
-    }
-
     private DataElementService dataElementService;
 
     public void setDataElementService( DataElementService dataElementService )
@@ -100,18 +78,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/Output
+    // Input
     // -------------------------------------------------------------------------
 
     public void setDataSetId( Integer dataSetId )
@@ -129,65 +96,6 @@
         this.selectedList = selectedList;
     }
 
-    public Integer getCategoryComboId()
-    {
-        return categoryComboId;
-    }
-
-    public void setCategoryComboId( Integer categoryComboId )
-    {
-        this.categoryComboId = categoryComboId;
-    }
-
-    public void setDataElements( List<DataElement> dataElements )
-    {
-        this.dataElements = dataElements;
-    }
-
-    public void setDataSet( DataSet dataSet )
-    {
-        this.dataSet = dataSet;
-    }
-
-    public void setCategoryCombo( DataElementCategoryCombo categoryCombo )
-    {
-        this.categoryCombo = categoryCombo;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/Output
-    // -------------------------------------------------------------------------
-
-    public Integer getDataSetId()
-    {
-        return dataSetId;
-    }
-
-    public DataSet getDataSet()
-    {
-        return dataSet;
-    }
-
-    public DataElementCategoryCombo getCategoryCombo()
-    {
-        return categoryCombo;
-    }
-
-    public List<DataElement> getDataElements()
-    {
-        return dataElements;
-    }
-
-    public List<String> getSelectedList()
-    {
-        return selectedList;
-    }
-
-    public List<DataElementGroup> getDataElementGroups()
-    {
-        return dataElementGroups;
-    }
-
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -195,41 +103,7 @@
     public String execute()
         throws Exception
     {
-        dataSet = dataSetService.getDataSet( dataSetId.intValue() );
-
-        if ( this.sectionName == null )
-        {
-            dataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
-
-            for ( Section section : dataSet.getSections() )
-            {
-                dataElements.removeAll( section.getDataElements() );
-            }
-
-            categoryCombo = dataElementCategoryService.getDataElementCategoryCombo( categoryComboId.intValue() );
-
-            Iterator<DataElement> dataElementIterator = dataElements.iterator();
-
-            while ( dataElementIterator.hasNext() )
-            {
-                DataElement de = dataElementIterator.next();
-
-                if ( !de.getCategoryCombo().getName().equalsIgnoreCase( categoryCombo.getName() ) )
-                {
-                    dataElementIterator.remove();
-                }
-            }
-
-            dataElementGroups = new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() );
-
-            Collections.sort( dataElements, new DataElementNameComparator() );
-
-            Collections.sort( dataElementGroups, new DataElementGroupNameComparator() );
-
-            displayPropertyHandler.handle( dataElements );
-
-            return INPUT;
-        }
+        DataSet dataSet = dataSetService.getDataSet( dataSetId );
 
         Section section = new Section();
 
@@ -250,5 +124,4 @@
 
         return SUCCESS;
     }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/EditSectionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/EditSectionAction.java	2010-10-22 13:49:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/EditSectionAction.java	2010-11-29 16:21:11 +0000
@@ -190,7 +190,7 @@
             {
                 DataElement de = dataElementIterator.next();
                 
-                if ( !de.getCategoryCombo().getName().equalsIgnoreCase( categoryCombo.getName() ) )
+                if ( !de.getCategoryCombo().equals( categoryCombo ) )
                 {
                     dataElementIterator.remove();
                 }

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionOptionsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionOptionsAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionOptionsAction.java	2010-11-29 16:21:11 +0000
@@ -0,0 +1,136 @@
+package org.hisp.dhis.dataset.action.section;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategoryCombo;
+import org.hisp.dhis.dataelement.DataElementCategoryService;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.dataset.Section;
+import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
+
+import com.opensymphony.xwork2.Action;
+
+public class GetSectionOptionsAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private DataElementCategoryService categoryService;
+
+    public void setCategoryService( DataElementCategoryService categoryService )
+    {
+        this.categoryService = categoryService;
+    }
+
+    private DataSetService dataSetService;
+    
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+
+    private DisplayPropertyHandler displayPropertyHandler;
+
+    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
+    {
+        this.displayPropertyHandler = displayPropertyHandler;
+    }
+
+    private Comparator<DataElement> dataElementComparator;
+
+    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
+    {
+        this.dataElementComparator = dataElementComparator;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer dataSetId;
+
+    public void setDataSetId( Integer dataSetId )
+    {
+        this.dataSetId = dataSetId;
+    }
+
+    private Integer categoryComboId;
+    
+    public void setCategoryComboId( Integer categoryComboId )
+    {
+        this.categoryComboId = categoryComboId;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private DataSet dataSet;
+
+    public DataSet getDataSet()
+    {
+        return dataSet;
+    }
+
+    private DataElementCategoryCombo categoryCombo;
+    
+    public DataElementCategoryCombo getCategoryCombo()
+    {
+        return categoryCombo;
+    }
+    
+    private List<DataElement> dataElements = new ArrayList<DataElement>();
+    
+    public List<DataElement> getDataElements()
+    {
+        return dataElements;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    @Override
+    public String execute()
+        throws Exception
+    {
+        dataSet = dataSetService.getDataSet( dataSetId );
+        
+        categoryCombo = categoryService.getDataElementCategoryCombo( categoryComboId );
+        
+        dataElements = new ArrayList<DataElement>( dataSet.getDataElements() ); // Available data elements must be member of data set
+
+        for ( Section section : dataSet.getSections() )
+        {
+            dataElements.removeAll( section.getDataElements() ); // Remove data elements used in other sections for data set
+        }
+
+        categoryCombo = categoryService.getDataElementCategoryCombo( categoryComboId.intValue() );
+
+        Iterator<DataElement> dataElementIterator = dataElements.iterator();
+
+        while ( dataElementIterator.hasNext() )
+        {
+            DataElement de = dataElementIterator.next();
+
+            if ( !de.getCategoryCombo().getName().equalsIgnoreCase( categoryCombo.getName() ) )
+            {
+                dataElementIterator.remove(); // Remove data elements with different category combo
+            }
+        }
+
+        Collections.sort( dataElements, dataElementComparator );
+
+        displayPropertyHandler.handle( dataElements );
+
+        return SUCCESS;
+    }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml	2010-11-26 03:22:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml	2010-11-29 16:21:11 +0000
@@ -45,8 +45,15 @@
 		<property name="dataElementService">
 			<ref bean="org.hisp.dhis.dataelement.DataElementService"/>
 		</property>
-		<property name="dataElementCategoryService">
+	</bean>
+	
+	<bean id="org.hisp.dhis.dataset.action.section.GetSectionOptionsAction"
+		class="org.hisp.dhis.dataset.action.section.GetSectionOptionsAction" scope="prototype">
+		<property name="categoryService">
 			<ref bean="org.hisp.dhis.dataelement.DataElementCategoryService"/>
+		</property>	
+		<property name="dataSetService">
+			<ref bean="org.hisp.dhis.dataset.DataSetService"/>
 		</property>
 	</bean>
 	

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml	2010-11-27 09:37:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml	2010-11-29 16:21:11 +0000
@@ -43,12 +43,16 @@
       <param name="javascripts">javascript/section.js</param>
     </action>
     
-    <action name="addSectionAction" class="org.hisp.dhis.dataset.action.section.AddSectionAction">
-      <result name="input" type="velocity">/main.vm</result>
+    <action name="getSectionOptions" 
+      class="org.hisp.dhis.dataset.action.section.GetSectionOptionsAction">
+      <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-maintenance-dataset/addSection.vm</param>
       <param name="menu">/dhis-web-maintenance-dataset/menu.vm</param>
+      <param name="javascripts">javascript/section.js</param>
+    </action>
+    
+    <action name="addSection" class="org.hisp.dhis.dataset.action.section.AddSectionAction">
       <result name="success" type="redirect">section.action</result>
-      <param name="javascripts">javascript/section.js</param>
     </action>
     
     <action name="validateSection"
@@ -72,7 +76,7 @@
       <param name="onExceptionReturn">plainTextError</param>
     </action>  
     
-    <action name="editSectionAction" 
+    <action name="editSection" 
       class="org.hisp.dhis.dataset.action.section.EditSectionAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-maintenance-dataset/editSection.vm</param>
@@ -226,8 +230,6 @@
     
     <!-- DataEntryForm -->
     
-    
-    
     <action name="viewDataEntryForm"
       class="org.hisp.dhis.dataset.action.dataentryform.GetSelectedDataElementsAction">
       <result name="success" type="chain">viewDataEntryFormChain</result>
@@ -242,8 +244,6 @@
       <param name="stylesheets">css/cde.css</param>
     </action>
     
-    
-    
     <action name="saveDataEntryForm"
       class="org.hisp.dhis.dataset.action.dataentryform.SaveDataEntryFormAction">
       <result name="success" type="redirect">dataSet.action</result>
@@ -388,15 +388,6 @@
       <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
       <param name="onExceptionReturn">plainTextError</param>
     </action>
-    <!-- 
-     <action name="exportEntryForm" class="org.hisp.dhis.dataset.action.dataentryform.ExportDataEntryFormAction">
-      <result name="success" type="stream">
-        <param name="contentType">application/octet-stream</param>
-        <param name="inputName">inputStream</param>
-        <param name="contentDisposition">filename="${fileName}"</param>
-        <param name="bufferSize">10240</param>				
-      </result>
-	</action>
-    -->
+    
   </package>
 </struts>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm	2010-09-25 20:13:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm	2010-11-29 16:21:11 +0000
@@ -1,5 +1,4 @@
-<script>
-	
+<script>	
 	jQuery(document).ready(	function()
 	{		
 		validation( 'addSectionForm', function( form ){ form.submit() }, function(){ selectAllById('selectedList') });
@@ -7,18 +6,16 @@
 		checkValueIsExist( "sectionName", "validateSection.action", {
 			dataSetId:function(){return jQuery("#dataSetId").val()}
 			,name: function(){return jQuery("#sectionName").val()}					
-		});	
-		
+		});
 	});
-	
 </script>
 
 <h3>$i18n.getString( "add_section" )</h3>
 
-<form id="addSectionForm" name="addSectionForm" action="addSectionAction.action" method="post" >
+<form id="addSectionForm" name="addSectionForm" action="addSection.action" method="post" >
   <table id="detailsList">
-    <col/> ## Labels
-    <col/> ## Input
+    <col/>
+    <col/>
     <thead>
       <tr>
         <th colspan="2">$i18n.getString( "section_details" )</th>
@@ -53,33 +50,15 @@
 		<th>$i18n.getString( "selected_data_elements" )</th>
       </tr>
     </thead>
-    <tbody>
-
-      <tr>        
-        <td>
-          <select id="dataElementGroupSelect" name="dataElementGroupSelect" style="min-width:26.5em"
-            onchange="javascript:filterByDataElementGroupForSection( this.options[this.selectedIndex].value )">
-            <option value="ALL" selected="selected">$i18n.getString( "all" )</option>
-            #foreach ( $dataElementGroup in $dataElementGroups )
-            <option value="$dataElementGroup.id">$encoder.htmlEncode( $dataElementGroup.name )</option>
-            #end
-          </select>
-        </td>
-        <td align="center">[$i18n.getString( "group" )]</td>
-        <td></td>        
-      </tr>
-      
+    <tbody>      
       <tr>
       	<td><input type="text" id="availableDataElementsFilter" onkeyup="filterList( this.value, 'availableList' )" style="min-width:26em"/></td>
       	<td align="center">[$i18n.getString( "name" )]</td>
       	<td><input type="text" id="dataSetSectionMembersFilter" onkeyup="filterList( this.value, 'selectedList' )" style="min-width:26em"/></td>
-      </tr>
-	
+      </tr>	
       <tr>
         <td>
-          <!-- List of all available DataElements -->
           <select size="15" id="availableList" name="availableList" multiple="multiple" style="min-width:25em;height:20em" ondblclick="moveSelected( this, document.getElementById( 'selectedList' ) )">
-            <!-- Show all available DataElements -->
             #foreach ( $availableDataElement in $dataElements )
               <option value="$availableDataElement.id">$encoder.htmlEncode( $availableDataElement.name )</option>
             #end
@@ -100,13 +79,6 @@
             <a href="javascript:moveDownSelectedOption( 'selectedList' )"><img src="../images/move_down.png"></a><br/><br/>
         </td>
       </tr>
-
-      <tr>
-        <td colspan="3">
-          <span id="message"></span>
-        </td>
-      </tr>
-
       <tr>
         <td colspan="3">
           <input type="submit" value="$i18n.getString( 'save' )"/>
@@ -116,3 +88,5 @@
     </tbody>
   </table>
 </form>
+
+<span id="message"></span>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js	2010-10-12 08:22:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js	2010-11-29 16:21:11 +0000
@@ -13,7 +13,6 @@
 function sectionReceived( sectionElement )
 {
   setInnerHTML( 'nameField', getElementValue( sectionElement, 'name' ) );
-  //setInnerHTML( 'titleField', getElementValue( sectionElement, 'title' ) );
   setInnerHTML( 'dataSetField', getElementValue( sectionElement, 'dataSet' ) );
   setInnerHTML( 'categoryComboField', getElementValue( sectionElement, 'categoryCombo' ) );
   setInnerHTML( 'dataElementCountField', getElementValue( sectionElement, 'dataElementCount' ) );  
@@ -43,12 +42,11 @@
 	var dataSetId = document.getElementById('dataSetId').value;
 	var categoryComboId = document.getElementById('categoryComboId').value;
 
-	if (dataSetId == "null" || dataSetId == "" || categoryComboId == "null"
-			|| categoryComboId == "") {
+	if (dataSetId == "null" || dataSetId == "" || categoryComboId == "null"	|| categoryComboId == "") {
 		showWarningMessage( i18n_please_select_dataset_categorycombo );
-	} else {
-		window.location.href = "addSectionAction.action?dataSetId=" + dataSetId
-				+ "&categoryComboId=" + categoryComboId;
+	} 
+	else {
+		window.location.href = "getSectionOptions.action?dataSetId=" + dataSetId + "&categoryComboId=" + categoryComboId;
 	}
 }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm	2010-11-29 15:42:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm	2010-11-29 16:21:11 +0000
@@ -52,7 +52,7 @@
 				<tr id="tr${section.id}">
 					<td onclick="showSectionDetails( $section.id )">$encoder.htmlEncode( $section.dataSet.name )</td> 
 					<td onclick="showSectionDetails( $section.id )">$encoder.htmlEncode( $section.name )</td>		
-					<td style="text-align:center"><a href="editSectionAction.action?sectionId=$section.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"/></a></td>
+					<td style="text-align:center"><a href="editSection.action?sectionId=$section.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"/></a></td>
 					<td style="text-align:center"><a href="javascript:translate( '$section.getClass().getSimpleName()', '$section.id' )" title="$i18n.getString( 'translation_translate' )"><img src="../images/i18n.png" alt="$i18n.getString( 'translation_translate' )"/></a></td>
 					<td style="text-align:center"><a href="javascript:removeSection( '$section.id', '$encoder.jsEncode( $section.name )' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"/></a></td>
 					<td style="text-align:center"><a href="greySection.action?sectionId=$section.id" title="$i18n.getString( 'section_grey_field_managment' )"><img src="../images/edit_layout.png" alt="$i18n.getString( 'section_grey_field_managment' )"/></a></td>