mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Fix for SF bug [2541285] Submission Forms don't preserve order of values
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3394 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -769,7 +769,7 @@ public class DescribeStep extends AbstractProcessingStep
|
||||
{
|
||||
List vals = new LinkedList();
|
||||
|
||||
int i = 0;
|
||||
int i = 1; //start index at the first of the previously entered values
|
||||
boolean foundLast = false;
|
||||
|
||||
log.debug("getRepeatedParameter: metadataField=" + metadataField
|
||||
@@ -779,10 +779,19 @@ public class DescribeStep extends AbstractProcessingStep
|
||||
while (!foundLast)
|
||||
{
|
||||
String s = null;
|
||||
if (i == 0)
|
||||
|
||||
//First, add the previously entered values.
|
||||
// This ensures we preserve the order that these values were entered
|
||||
s = request.getParameter(param + "_" + i);
|
||||
|
||||
// If there are no more previously entered values,
|
||||
// see if there's a new value entered in textbox
|
||||
if (s==null)
|
||||
{
|
||||
s = request.getParameter(param);
|
||||
else
|
||||
s = request.getParameter(param + "_" + i);
|
||||
//this will be the last value added
|
||||
foundLast = true;
|
||||
}
|
||||
|
||||
// We're only going to add non-null values
|
||||
if (s != null)
|
||||
@@ -808,13 +817,7 @@ public class DescribeStep extends AbstractProcessingStep
|
||||
}
|
||||
|
||||
if (addValue)
|
||||
vals.add(s.trim());
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the value was null (as opposed to present,
|
||||
// but empty) we've reached the last name
|
||||
foundLast = true;
|
||||
vals.add(s.trim());
|
||||
}
|
||||
|
||||
i++;
|
||||
|
@@ -52,6 +52,7 @@
|
||||
- [2462293] Enable Google Sitemaps for XMLUI
|
||||
- Fixed small bug in XMLUI's org.dspace.app.xmlui.cocoon.DSpaceMETSGenerator which caused Repository-wide METS file to fail to generate.
|
||||
- [2477820] DSpace 1.5 XMLUI - Enable METS <amdSec> using crosswalks
|
||||
- Fix for SF bug [2541285] Submission Forms don't preserve order of values
|
||||
|
||||
(Kim Shepherd)
|
||||
- [2385187] Fix for toDate method in DCDate
|
||||
|
Reference in New Issue
Block a user