dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05494
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1791: Fixed editSection.vm so form data is submitted.
------------------------------------------------------------
revno: 1791
committer: Bob Jolliffe <bobj@bobj-laptop>
branch nick: trunk
timestamp: Tue 2010-04-20 23:58:35 +0100
message:
Fixed editSection.vm so form data is submitted.
Renamed lots of things trying to get more consistent and get rid of ognl problem below.
There is still a strange problem which I can't get rid of (or understand) where a log message related to ognl is emitted:
* WARN 23:38:39,165 Error setting value (CommonsLogger.java [16322634@qtp-9209226-0])
ognl.ExpressionSyntaxException: Malformed OGNL expression: [ognl.ParseException: Encountered "<EOF>" at line 1, column 0.
modified:
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/UpdateSectionAction.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/webapp/dhis-web-maintenance-dataset/editSection.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/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-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/EditSectionAction.java 2010-04-20 22:58:35 +0000
@@ -68,7 +68,7 @@
private Section section;
- private List<DataElement> selectedList = new ArrayList<DataElement>();
+ private List<DataElement> dataElementsOfSection = new ArrayList<DataElement>();
private DataSet dataSet;
@@ -94,14 +94,14 @@
this.section = section;
}
- public List<DataElement> getSelectedList()
+ public List<DataElement> getDataElementsOfSection()
{
- return selectedList;
+ return dataElementsOfSection;
}
- public void setSelectedList( List<DataElement> selectedList )
+ public void setDataElementsOfSection( List<DataElement> dataElementsOfSection )
{
- this.selectedList = selectedList;
+ this.dataElementsOfSection = dataElementsOfSection;
}
public Collection<DataElement> getDataElementOfDataSet()
@@ -133,7 +133,7 @@
{
section = sectionService.getSection( sectionId.intValue() );
- selectedList = section.getDataElements();
+ dataElementsOfSection = section.getDataElements();
dataSet = dataSetService.getDataSet( section.getDataSet().getId() );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/UpdateSectionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/UpdateSectionAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/UpdateSectionAction.java 2010-04-20 22:58:35 +0000
@@ -51,11 +51,11 @@
this.sectionService = sectionService;
}
- private DataElementService dataElementServcie;
+ private DataElementService dataElementService;
- public void setDataElementServcie( DataElementService dataElementServcie )
+ public void setDataElementService( DataElementService dataElementService )
{
- this.dataElementServcie = dataElementServcie;
+ this.dataElementService = dataElementService;
}
// -------------------------------------------------------------------------
@@ -64,15 +64,24 @@
private Integer sectionId;
+ private Integer dataSetId;
+
private String sectionLabel;
private List<String> selectedList;
+ private List<String> availableList;
+
public void setSectionId( Integer sectionId )
{
this.sectionId = sectionId;
}
+ public void setDataSetId( Integer dataSetId )
+ {
+ this.dataSetId = dataSetId;
+ }
+
public void setSectionLabel( String sectionLabel )
{
this.sectionLabel = sectionLabel;
@@ -83,6 +92,11 @@
this.selectedList = selectedList;
}
+ public void setAvailableList( List<String> availableList )
+ {
+ this.availableList = availableList;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -101,7 +115,7 @@
for ( String id : selectedList )
{
- DataElement d = dataElementServcie.getDataElement( Integer.parseInt( id ) );
+ DataElement d = dataElementService.getDataElement( Integer.parseInt( id ) );
dataElements.add( d );
}
=== 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-03-31 09:54:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml 2010-04-20 22:58:35 +0000
@@ -75,7 +75,7 @@
<property name="sectionService">
<ref bean="org.hisp.dhis.dataset.SectionService"/>
</property>
- <property name="dataElementServcie">
+ <property name="dataElementService">
<ref bean="org.hisp.dhis.dataelement.DataElementService"/>
</property>
</bean>
@@ -393,7 +393,7 @@
<ref bean="org.hisp.dhis.dataelement.DataElementService"/>
</property>
<property name="categoryService">
- <ref bean="org.hisp.dhis.dataelement.DataElementCategoryService"/>
+ <ref bean="org.hisp.dhis.dataelement.DataElementCategoryService"/>
</property>
</bean>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editSection.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editSection.vm 2010-02-09 09:10:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editSection.vm 2010-04-20 22:58:35 +0000
@@ -10,7 +10,10 @@
,errorElement:"td"
,submitHandler: function(form)
{
- submitForm();
+ // select all in the selectedList!
+ submitForm();
+ // actually submit the form
+ document.forms['editDataSetForm'].submit();
}
});
jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
@@ -25,7 +28,7 @@
<form id="editDataSetForm" name="editDataSetForm" action="updateSection.action" method="post" >
<div style="display:inline">
<input type="hidden" id="dataSetId" name="dataSetId" value="$dataSet.id">
- <input type="hidden" id="sectionId" name="sectionId" value="$sectionId">
+ <input type="hidden" id="sectionId" name="sectionId" value="$section.id">
</div>
<table id="detailsList">
@@ -65,7 +68,7 @@
<tr>
<td>
<!-- List of all available DataElements -->
- <select size="15" id="availableList" name="dataElementOfDataSet" multiple="multiple" style="min-width:20em;height:20em" ondblclick="move( 'availableList' )">
+ <select size="15" id="availableList" name="availableList" multiple="multiple" style="min-width:20em;height:20em" ondblclick="move( 'availableList' )">
<!-- Show all available DataElements -->
#foreach ( $availableDataElement in $dataElementOfDataSet )
<option value="$availableDataElement.id"> $availableDataElement.name</option>
@@ -79,7 +82,7 @@
</td>
<td>
<select id="selectedList" name="selectedList" multiple="multiple" style="min-width:20em;height:20em" ondblclick="move( 'selectedList' )">
- #foreach ( $dataElement in $selectedList )
+ #foreach ( $dataElement in $dataElementsOfSection )
<option value="$dataElement.id">$dataElement.name</option>
#end
</select>