Author: kwright
Date: Fri Sep  5 16:48:06 2014
New Revision: 1622740

URL: http://svn.apache.org/r1622740
Log:
More work on CONNECTORS-977.

Modified:
    
manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/AlfrescoRepositoryConnector.java
    
manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification.js
    
manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification_LuceneQuery.html
    
manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
    
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification.js
    
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_CMISQuery.html
    
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification.html
    
manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
    
manifoldcf/trunk/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
    
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification.js
    
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_DropboxPath.html
    
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_Security.html
    
manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
    
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/SpecificationHeader.js
    
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html
    
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html
    
manifoldcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/FilenetConnector.java
    
manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
    
manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java
    
manifoldcf/trunk/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java
    
manifoldcf/trunk/connectors/googledrive/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/googledrive/editSpecification_googledrive.js
    
manifoldcf/trunk/connectors/googledrive/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/googledrive/editSpecification_googledriveQuery.html
    
manifoldcf/trunk/connectors/googledrive/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/googledrive/editSpecification_googledriveSecurity.html
    
manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/hdfs/HDFSRepositoryConnector.java
    
manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
    
manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
    
manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
    
manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jira.js
    
manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraQuery.html
    
manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html
    
manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
    
manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioConnector.java
    
manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
    
manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/NavigationDerbyUI.java
    
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
    
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification.js
    
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Metadata.html
    
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Paths.html
    
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Security.html
    
manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editSpecification.js
    
manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
    
manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/NavigationDerbyUI.java
    
manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
    
manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java

Modified: 
manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/AlfrescoRepositoryConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/AlfrescoRepositoryConnector.java?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/AlfrescoRepositoryConnector.java
 (original)
+++ 
manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/AlfrescoRepositoryConnector.java
 Fri Sep  5 16:48:06 2014
@@ -102,6 +102,12 @@ public class AlfrescoRepositoryConnector
   /** Tab name parameter for managin the view of the Web UI */
   private static final String TAB_NAME_PARAM = "TabName";
   
+  /** The sequence number parameter */
+  private static final String SEQ_NUM_PARAM = "SeqNum";
+  
+  /** The selected sequence number parameter */
+  private static final String SELECTED_NUM_PARAM = "SelectedNum";
+  
   /** The Lucene Query label for the configuration tab of the job settings */
   private static final String TAB_LABEL_LUCENE_QUERY_RESOURCE = 
"AlfrescoConnector.LuceneQuery";
   /** Alfresco Server configuration tab name */
@@ -641,7 +647,7 @@ public class AlfrescoRepositoryConnector
   public String processConfigurationPost(IThreadContext threadContext,
       IPostParameters variableContext, Locale locale, ConfigParams parameters)
       throws ManifoldCFException {
-
+        
     String username = 
variableContext.getParameter(AlfrescoConfig.USERNAME_PARAM);
     if (username != null) {
       parameters.setParameter(AlfrescoConfig.USERNAME_PARAM, username);
@@ -719,6 +725,7 @@ public class AlfrescoRepositoryConnector
         
     // Fill in parameters from all tabs
     fillInLuceneQueryParameters(paramMap, ds);
+    paramMap.put(SEQ_NUM_PARAM, Integer.toString(connectionSequenceNumber));
 
     outputResource(VIEW_SPEC_FORWARD, out, locale, paramMap);
   }
@@ -739,7 +746,9 @@ public class AlfrescoRepositoryConnector
   public String processSpecificationPost(IPostParameters variableContext, 
Locale locale, Specification ds,
     int connectionSequenceNumber)
     throws ManifoldCFException {
-    String luceneQuery = 
variableContext.getParameter(AlfrescoConfig.LUCENE_QUERY_PARAM);
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
+    String luceneQuery = variableContext.getParameter(seqPrefix + 
AlfrescoConfig.LUCENE_QUERY_PARAM);
     if (luceneQuery != null) {
       int i = 0;
       while (i < ds.getChildCount()) {
@@ -782,6 +791,9 @@ public class AlfrescoRepositoryConnector
     // LuceneQuery tab
     Map<String,String> paramMap = new HashMap<String,String>();
     paramMap.put(TAB_NAME_PARAM, tabName);
+    paramMap.put(SEQ_NUM_PARAM, Integer.toString(connectionSequenceNumber));
+    paramMap.put(SELECTED_NUM_PARAM, Integer.toString(actualSequenceNumber));
+
     fillInLuceneQueryParameters(paramMap, ds);
     outputResource(EDIT_SPEC_FORWARD_LUCENEQUERY, out, locale, paramMap);
   }
@@ -806,7 +818,8 @@ public class AlfrescoRepositoryConnector
         
     // Fill in parameters from all tabs
     Map<String,String> paramMap = new HashMap<String,String>();
-        
+    paramMap.put(SEQ_NUM_PARAM, Integer.toString(connectionSequenceNumber));
+
     // LuceneQuery tab
     fillInLuceneQueryParameters(paramMap, ds);
 

Modified: 
manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification.js
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification.js?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification.js
 (original)
+++ 
manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification.js
 Fri Sep  5 16:48:06 2014
@@ -17,16 +17,5 @@
 
 <script type="text/javascript">
 <!--
-function checkSpecification()
-{
-  // Does nothing right now.
-  return true;
-}
- 
-function SpecOp(n, opValue, anchorvalue)
-{
-  eval("editjob."+n+".value = \""+opValue+"\"");
-  postFormSetAnchor(anchorvalue);
-}
 //-->
 </script>
\ No newline at end of file

Modified: 
manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification_LuceneQuery.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification_LuceneQuery.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification_LuceneQuery.html
 (original)
+++ 
manifoldcf/trunk/connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/editSpecification_LuceneQuery.html
 Fri Sep  5 16:48:06 2014
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-#if($TABNAME == $ResourceBundle.getString('AlfrescoConnector.LuceneQuery'))
+#if($TABNAME == $ResourceBundle.getString('AlfrescoConnector.LuceneQuery') && 
${SEQNUM} == ${SELECTEDNUM})
 
 <table class="displaytable">
   <tr>
@@ -31,7 +31,7 @@
     </td>
     <td class="value">
       <nobr>
-        <input type="text" size="120" name="luceneQuery" 
value="$Encoder.attributeEscape($LUCENEQUERY)" />
+        <input type="text" size="120" name="s${SEQNUM}_luceneQuery" 
value="$Encoder.attributeEscape($LUCENEQUERY)" />
       </nobr>
     </td>
   </tr>
@@ -39,6 +39,6 @@
 
 #else
 
-<input type="hidden" name="luceneQuery" 
value="$Encoder.attributeEscape($LUCENEQUERY)" />
+<input type="hidden" name="s${SEQNUM}_luceneQuery" 
value="$Encoder.attributeEscape($LUCENEQUERY)" />
 
 #end

Modified: 
manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
 (original)
+++ 
manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
 Fri Sep  5 16:48:06 2014
@@ -946,6 +946,7 @@ public class CmisRepositoryConnector ext
     throws ManifoldCFException, IOException {
   
     Map<String,String> paramMap = new HashMap<String,String>();
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
 
     // Fill in the map with data from all tabs
     fillInCMISQuerySpecificationMap(paramMap, ds);
@@ -969,7 +970,9 @@ public class CmisRepositoryConnector ext
   public String processSpecificationPost(IPostParameters variableContext, 
Locale locale, Specification ds,
     int connectionSequenceNumber)
     throws ManifoldCFException {
-    String cmisQuery = 
variableContext.getParameter(CmisConfig.CMIS_QUERY_PARAM);
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
+    String cmisQuery = variableContext.getParameter(seqPrefix + 
CmisConfig.CMIS_QUERY_PARAM);
     if (cmisQuery != null) {
       int i = 0;
       while (i < ds.getChildCount()) {
@@ -1010,6 +1013,9 @@ public class CmisRepositoryConnector ext
     // Output CMISQuery tab
     Map<String,String> paramMap = new HashMap<String,String>();
     paramMap.put("TabName", tabName);
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
+    paramMap.put("SelectedNum", Integer.toString(actualSequenceNumber));
+
     fillInCMISQuerySpecificationMap(paramMap, ds);
     outputResource(EDIT_SPEC_FORWARD_CMISQUERY, out, locale, paramMap);
   }
@@ -1032,7 +1038,8 @@ public class CmisRepositoryConnector ext
     tabsArray.add(Messages.getString(locale,CMIS_QUERY_TAB_PROPERTY));
   
     Map<String,String> paramMap = new HashMap<String,String>();
-  
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
+
     // Fill in the specification header map, using data from all tabs.
     fillInCMISQuerySpecificationMap(paramMap, ds);
 

Modified: 
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification.js
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification.js?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification.js
 (original)
+++ 
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification.js
 Fri Sep  5 16:48:06 2014
@@ -17,16 +17,5 @@
 
 <script type="text/javascript">
 <!--
-function checkSpecification()
-{
-  // Does nothing right now.
-  return true;
-}
- 
-function SpecOp(n, opValue, anchorvalue)
-{
-  eval("editjob."+n+".value = \""+opValue+"\"");
-  postFormSetAnchor(anchorvalue);
-}
 //-->
 </script>
\ No newline at end of file

Modified: 
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_CMISQuery.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_CMISQuery.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_CMISQuery.html
 (original)
+++ 
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_CMISQuery.html
 Fri Sep  5 16:48:06 2014
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-#if($TABNAME == $ResourceBundle.getString('CmisRepositoryConnector.CMISQuery'))
+#if($TABNAME == $ResourceBundle.getString('CmisRepositoryConnector.CMISQuery') 
&& ${SEQNUM} == ${SELECTEDNUM})
 
 <table class="displaytable">
   <tr>
@@ -31,7 +31,7 @@
     </td>
     <td class="value">
       <nobr>
-        <input type="text" size="120" name="cmisQuery" 
value="$Encoder.attributeEscape($CMISQUERY)" />
+        <input type="text" size="120" name="s${SEQNUM}_cmisQuery" 
value="$Encoder.attributeEscape($CMISQUERY)" />
       </nobr>
     </td>
   </tr>
@@ -39,6 +39,6 @@
 
 #else
 
-<input type="hidden" name="cmisQuery" 
value="$Encoder.attributeEscape($CMISQUERY)" />
+<input type="hidden" name="s${SEQNUM}_cmisQuery" 
value="$Encoder.attributeEscape($CMISQUERY)" />
 
 #end

Modified: 
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification.html
 (original)
+++ 
manifoldcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification.html
 Fri Sep  5 16:48:06 2014
@@ -18,7 +18,9 @@
 <table class="displaytable">
   <tr>
     <td class="description">
-      
$Encoder.bodyEscape($ResourceBundle.getString('CmisRepositoryConnector.CMISQueryColon'))
+      <nobr>
+        
$Encoder.bodyEscape($ResourceBundle.getString('CmisRepositoryConnector.CMISQueryColon'))
+      </nobr>
     </td>
     <td class="value">
       $Encoder.bodyEscape($CMISQUERY)

Modified: 
manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
 (original)
+++ 
manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
 Fri Sep  5 16:48:06 2014
@@ -2228,6 +2228,8 @@ public class DCTM extends org.apache.man
     int connectionSequenceNumber, List<String> tabsArray)
     throws ManifoldCFException, IOException
   {
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
     tabsArray.add(Messages.getString(locale,"DCTM.Paths"));
     tabsArray.add(Messages.getString(locale,"DCTM.DocumentTypes"));
     tabsArray.add(Messages.getString(locale,"DCTM.ContentTypes"));
@@ -2238,62 +2240,62 @@ public class DCTM extends org.apache.man
 "<script type=\"text/javascript\">\n"+
 "<!--\n"+
 "\n"+
-"function checkSpecification()\n"+
+"function "+seqPrefix+"checkSpecification()\n"+
 "{\n"+
-"  if (editjob.specmaxdoclength.value != \"\" && 
!isInteger(editjob.specmaxdoclength.value))\n"+
+"  if (editjob."+seqPrefix+"specmaxdoclength.value != \"\" && 
!isInteger(editjob."+seqPrefix+"specmaxdoclength.value))\n"+
 "  {\n"+
 "    alert(\"" + 
Messages.getBodyJavascriptString(locale,"DCTM.MaximumDocumentLengthMustBeNullOrAnInteger")
 + "\");\n"+
-"    editjob.specmaxdoclength.focus();\n"+
+"    editjob."+seqPrefix+"specmaxdoclength.focus();\n"+
 "    return false;\n"+
 "  }\n"+
 "  return true;\n"+
 "}\n"+
 "\n"+
-"function SpecOp(n, opValue, anchorvalue)\n"+
+"function "+seqPrefix+"SpecOp(n, opValue, anchorvalue)\n"+
 "{\n"+
 "  eval(\"editjob.\"+n+\".value = \\\"\"+opValue+\"\\\"\");\n"+
 "  postFormSetAnchor(anchorvalue);\n"+
 "}\n"+
 "\n"+
-"function SpecAddToPath(anchorvalue)\n"+
+"function "+seqPrefix+"SpecAddToPath(anchorvalue)\n"+
 "{\n"+
-"  if (editjob.pathaddon.value == \"\")\n"+
+"  if (editjob."+seqPrefix+"pathaddon.value == \"\")\n"+
 "  {\n"+
 "    alert(\"" + 
Messages.getBodyJavascriptString(locale,"DCTM.SelectAFolderFirst") + "\");\n"+
-"    editjob.pathaddon.focus();\n"+
+"    editjob."+seqPrefix+"pathaddon.focus();\n"+
 "    return;\n"+
 "  }\n"+
 "\n"+
-"  SpecOp(\"pathop\",\"AddToPath\",anchorvalue);\n"+
+"  "+seqPrefix+"SpecOp(\""+seqPrefix+"pathop\",\"AddToPath\",anchorvalue);\n"+
 "}\n"+
 "\n"+
-"function SpecAddToken(anchorvalue)\n"+
+"function "+seqPrefix+"SpecAddToken(anchorvalue)\n"+
 "{\n"+
-"  if (editjob.spectoken.value == \"\")\n"+
+"  if (editjob."+seqPrefix+"spectoken.value == \"\")\n"+
 "  {\n"+
 "    alert(\"" + 
Messages.getBodyJavascriptString(locale,"DCTM.NullTokensNotAllowed") + "\");\n"+
-"    editjob.spectoken.focus();\n"+
+"    editjob."+seqPrefix+"spectoken.focus();\n"+
 "    return;\n"+
 "  }\n"+
 "\n"+
-"  SpecOp(\"accessop\",\"Add\",anchorvalue);\n"+
+"  "+seqPrefix+"SpecOp(\"accessop\",\"Add\",anchorvalue);\n"+
 "}\n"+
 "\n"+
-"function SpecAddMapping(anchorvalue)\n"+
+"function "+seqPrefix+"SpecAddMapping(anchorvalue)\n"+
 "{\n"+
-"  if (editjob.specmatch.value == \"\")\n"+
+"  if (editjob."+seqPrefix+"specmatch.value == \"\")\n"+
 "  {\n"+
 "    alert(\"" + 
Messages.getBodyJavascriptString(locale,"DCTM.EnterASpecificationFirst") + 
"\");\n"+
-"    editjob.specmatch.focus();\n"+
+"    editjob."+seqPrefix+"specmatch.focus();\n"+
 "    return;\n"+
 "  }\n"+
-"  if (!isRegularExpression(editjob.specmatch.value))\n"+
+"  if (!isRegularExpression(editjob."+seqPrefix+"specmatch.value))\n"+
 "  {\n"+
 "    alert(\"" + 
Messages.getBodyJavascriptString(locale,"DCTM.SpecificationMustBeValidRegularExpression")
 + "\");\n"+
-"    editjob.specmatch.focus();\n"+
+"    editjob."+seqPrefix+"specmatch.focus();\n"+
 "    return false;\n"+
 "  }\n"+
-"  SpecOp(\"specmappingop\",\"Add\",anchorvalue);\n"+
+"  "+seqPrefix+"SpecOp(\""+seqPrefix+"specmappingop\",\"Add\",anchorvalue);\n"+
 "  }\n"+
 "\n"+
 "//-->\n"+
@@ -2320,11 +2322,13 @@ public class DCTM extends org.apache.man
     int connectionSequenceNumber, int actualSequenceNumber, String tabName)
     throws ManifoldCFException, IOException
   {
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
     int i;
     int k;
 
     // Paths tab
-    if (tabName.equals(Messages.getString(locale,"DCTM.Paths")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.Paths")) && 
connectionSequenceNumber == actualSequenceNumber)
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2339,14 +2343,15 @@ public class DCTM extends org.apache.man
         if (sn.getType().equals(CONFIG_PARAM_LOCATION))
         {
           String pathDescription = "_" + Integer.toString(k);
-          String pathOpName = "pathop" + pathDescription;
+          String pathName = seqPrefix + "specpath" + pathDescription;
+          String pathOpName = seqPrefix + "pathop" + pathDescription;
           out.print(
 "  <tr>\n"+
 "    <td class=\"description\">\n"+
-"      <input type=\"hidden\" name=\""+"specpath"+pathDescription+"\" 
value=\""+sn.getAttributeValue("path")+"\"/>\n"+
+"      <input type=\"hidden\" name=\""+pathName+"\" 
value=\""+sn.getAttributeValue("path")+"\"/>\n"+
 "      <input type=\"hidden\" name=\""+pathOpName+"\" value=\"\"/>\n"+
-"      <a name=\""+"path_"+Integer.toString(k)+"\">\n"+
-"        <input type=\"button\" value=\"Delete\" 
onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"path_"+Integer.toString(k)+"\")'
 alt=\"" + 
Messages.getAttributeString(locale,"DCTM.DeletePath")+Integer.toString(k)+"\"/>\n"+
+"      <a name=\""+seqPrefix+"path_"+Integer.toString(k)+"\">\n"+
+"        <input type=\"button\" value=\"Delete\" 
onClick='Javascript:"+seqPrefix+"SpecOp(\""+pathOpName+"\",\"Delete\",\""+seqPrefix+"path_"+Integer.toString(k)+"\")'
 alt=\"" + 
Messages.getAttributeString(locale,"DCTM.DeletePath")+Integer.toString(k)+"\"/>\n"+
 "      </a>&nbsp;\n"+
 "    </td>\n"+
 "    <td class=\"value\">\n"+
@@ -2371,10 +2376,10 @@ public class DCTM extends org.apache.man
       out.print(
 "  <tr>\n"+
 "    <td class=\"description\">\n"+
-"      <input type=\"hidden\" name=\"pathcount\" 
value=\""+Integer.toString(k)+"\"/>\n"
+"      <input type=\"hidden\" name=\""+seqPrefix+"pathcount\" 
value=\""+Integer.toString(k)+"\"/>\n"
       );
        
-      String pathSoFar = (String)currentContext.get("specpath");
+      String pathSoFar = (String)currentContext.get(seqPrefix+"specpath");
       if (pathSoFar == null)
         pathSoFar = "/";
 
@@ -2392,10 +2397,10 @@ public class DCTM extends org.apache.man
         }
         
         out.print(
-"      <a name=\""+"path_"+Integer.toString(k)+"\">\n"+
-"        <input type=\"hidden\" name=\"specpath\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathSoFar)+"\"/>\n"+
-"        <input type=\"hidden\" name=\"pathop\" value=\"\"/>\n"+
-"        <input type=\"button\" value=\"Add\" alt=\"" + 
Messages.getAttributeString(locale,"DCTM.AddPath") + "\" 
onClick='Javascript:SpecOp(\"pathop\",\"Add\",\"path_"+Integer.toString(k+1)+"\")'/>&nbsp;\n"+
+"      <a name=\""+seqPrefix+"path_"+Integer.toString(k)+"\">\n"+
+"        <input type=\"hidden\" name=\""+seqPrefix+"specpath\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathSoFar)+"\"/>\n"+
+"        <input type=\"hidden\" name=\""+seqPrefix+"pathop\" value=\"\"/>\n"+
+"        <input type=\"button\" value=\"Add\" alt=\"" + 
Messages.getAttributeString(locale,"DCTM.AddPath") + "\" 
onClick='Javascript:"+seqPrefix+"SpecOp(\""+seqPrefix+"pathop\",\"Add\",\""+seqPrefix+"path_"+Integer.toString(k+1)+"\")'/>&nbsp;\n"+
 "      </a>\n"+
 "    </td>\n"+
 "    <td class=\"value\">\n"+
@@ -2404,14 +2409,14 @@ public class DCTM extends org.apache.man
         if (pathSoFar.length() > 1)
         {
           out.print(
-"      <input type=\"button\" value=\"-\" alt=\"" + 
Messages.getAttributeString(locale,"DCTM.RemoveFromPath") + "\" 
onClick='Javascript:SpecOp(\"pathop\",\"Up\",\"path_"+Integer.toString(k)+"\")'/>\n"
+"      <input type=\"button\" value=\"-\" alt=\"" + 
Messages.getAttributeString(locale,"DCTM.RemoveFromPath") + "\" 
onClick='Javascript:"+seqPrefix+"SpecOp(\""+seqPrefix+"pathop\",\"Up\",\""+seqPrefix+"path_"+Integer.toString(k)+"\")'/>\n"
           );
         }
         if (childList.length > 0)
         {
           out.print(
-"      <input type=\"button\" value=\"+\" alt=\"" + 
Messages.getAttributeString(locale,"DCTM.AddToPath") + "\" 
onClick='Javascript:SpecAddToPath(\"path_"+Integer.toString(k)+"\")'/>&nbsp;\n"+
-"      <select multiple=\"false\" name=\"pathaddon\" size=\"2\">\n"+
+"      <input type=\"button\" value=\"+\" alt=\"" + 
Messages.getAttributeString(locale,"DCTM.AddToPath") + "\" 
onClick='Javascript:"+seqPrefix+"SpecAddToPath(\""+seqPrefix+"path_"+Integer.toString(k)+"\")'/>&nbsp;\n"+
+"      <select multiple=\"false\" name=\""+seqPrefix+"pathaddon\" 
size=\"2\">\n"+
 "        <option value=\"\" selected=\"selected\">" + 
Messages.getBodyString(locale,"DCTM.PickAFolder") + "</option>\n"
           );
           int j = 0;
@@ -2454,14 +2459,15 @@ public class DCTM extends org.apache.man
         if (sn.getType().equals(CONFIG_PARAM_LOCATION))
         {
           String pathDescription = "_" + Integer.toString(k);
+          String pathName = seqPrefix + "specpath" + pathDescription;
           out.print(
-"<input type=\"hidden\" name=\""+"specpath"+pathDescription+"\" 
value=\""+sn.getAttributeValue("path")+"\"/>\n"
+"<input type=\"hidden\" name=\""+pathName+"\" 
value=\""+sn.getAttributeValue("path")+"\"/>\n"
           );
           k++;
         }
       }
       out.print(
-"<input type=\"hidden\" name=\"pathcount\" 
value=\""+Integer.toString(k)+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"pathcount\" 
value=\""+Integer.toString(k)+"\"/>\n"
       );
     }
 
@@ -2482,7 +2488,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString(locale,"DCTM.Security")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.Security")) && 
connectionSequenceNumber == actualSequenceNumber)
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2490,8 +2496,8 @@ public class DCTM extends org.apache.man
 "  <tr>\n"+
 "    <td class=\"description\"><nobr>" + 
Messages.getBodyString(locale,"DCTM.Security2") + "</nobr></td>\n"+
 "    <td class=\"value\" colspan=\"1\">\n"+
-"      <input type=\"radio\" name=\"specsecurity\" value=\"on\" 
"+((securityOn)?"checked=\"true\"":"")+" />Enabled&nbsp;\n"+
-"      <input type=\"radio\" name=\"specsecurity\" value=\"off\" 
"+((securityOn==false)?"checked=\"true\"":"")+" />Disabled\n"+
+"      <input type=\"radio\" name=\""+seqPrefix+"specsecurity\" value=\"on\" 
"+((securityOn)?"checked=\"true\"":"")+" />Enabled&nbsp;\n"+
+"      <input type=\"radio\" name=\""+seqPrefix+"specsecurity\" value=\"off\" 
"+((securityOn==false)?"checked=\"true\"":"")+" />Disabled\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"
@@ -2505,15 +2511,16 @@ public class DCTM extends org.apache.man
         if (sn.getType().equals("access"))
         {
           String accessDescription = "_"+Integer.toString(k);
-          String accessOpName = "accessop"+accessDescription;
+          String accessOpName = seqPrefix+"accessop"+accessDescription;
+          String accessTokenName = seqPrefix+"spectoken"+accessDescription;
           String token = sn.getAttributeValue("token");
           out.print(
 "  <tr>\n"+
 "    <td class=\"description\">\n"+
 "      <input type=\"hidden\" name=\""+accessOpName+"\" value=\"\"/>\n"+
-"      <input type=\"hidden\" name=\""+"spectoken"+accessDescription+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(token)+"\"/>\n"+
-"      <a name=\""+"token_"+Integer.toString(k)+"\">\n"+
-"        <input type=\"button\" value=\"Delete\" 
alt=\""+Messages.getAttributeString(locale,"DCTM.DeleteAccessToken")+Integer.toString(k)+"\"
 
onClick='Javascript:SpecOp(\""+accessOpName+"\",\"Delete\",\"token_"+Integer.toString(k)+"\")'/>\n"+
+"      <input type=\"hidden\" name=\""+accessTokenName+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(token)+"\"/>\n"+
+"      <a name=\""+seqPrefix+"token_"+Integer.toString(k)+"\">\n"+
+"        <input type=\"button\" value=\"Delete\" 
alt=\""+Messages.getAttributeString(locale,"DCTM.DeleteAccessToken")+Integer.toString(k)+"\"
 
onClick='Javascript:"+seqPrefix+"SpecOp(\""+accessOpName+"\",\"Delete\",\""+seqPrefix+"token_"+Integer.toString(k)+"\")'/>\n"+
 "      </a>\n"+
 "    </td>\n"+
 "    <td class=\"value\">\n"+
@@ -2536,14 +2543,14 @@ public class DCTM extends org.apache.man
 "  <tr><td class=\"lightseparator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
 "    <td class=\"description\">\n"+
-"      <input type=\"hidden\" name=\"tokencount\" 
value=\""+Integer.toString(k)+"\"/>\n"+
-"      <input type=\"hidden\" name=\"accessop\" value=\"\"/>\n"+
-"      <a name=\""+"token_"+Integer.toString(k)+"\">\n"+
-"        <input type=\"button\" value=\"Add\" alt=\"" + 
Messages.getAttributeString(locale,"DCTM.AddAccessToken") + "\" 
onClick='Javascript:SpecAddToken(\"token_"+Integer.toString(k+1)+"\")'/>\n"+
+"      <input type=\"hidden\" name=\""+seqPrefix+"tokencount\" 
value=\""+Integer.toString(k)+"\"/>\n"+
+"      <input type=\"hidden\" name=\""+seqPrefix+"accessop\" value=\"\"/>\n"+
+"      <a name=\""+seqPrefix+"token_"+Integer.toString(k)+"\">\n"+
+"        <input type=\"button\" value=\"Add\" alt=\"" + 
Messages.getAttributeString(locale,"DCTM.AddAccessToken") + "\" 
onClick='Javascript:"+seqPrefix+"SpecAddToken(\""+seqPrefix+"token_"+Integer.toString(k+1)+"\")'/>\n"+
 "      </a>\n"+
 "    </td>\n"+
 "    <td class=\"value\">\n"+
-"      <input type=\"text\" size=\"30\" name=\"spectoken\" value=\"\"/>\n"+
+"      <input type=\"text\" size=\"30\" name=\""+seqPrefix+"spectoken\" 
value=\"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "</table>\n"
@@ -2552,7 +2559,7 @@ public class DCTM extends org.apache.man
     else
     {
       out.print(
-"<input type=\"hidden\" name=\"specsecurity\" 
value=\""+(securityOn?"on":"off")+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"specsecurity\" 
value=\""+(securityOn?"on":"off")+"\"/>\n"
       );
       // Finally, go through forced ACL
       i = 0;
@@ -2565,14 +2572,14 @@ public class DCTM extends org.apache.man
           String accessDescription = "_"+Integer.toString(k);
           String token = sn.getAttributeValue("token");
           out.print(
-"<input type=\"hidden\" name=\""+"spectoken"+accessDescription+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(token)+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"spectoken"+accessDescription+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(token)+"\"/>\n"
           );
           k++;
         }
       }
 
       out.print(
-"<input type=\"hidden\" name=\"tokencount\" 
value=\""+Integer.toString(k)+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"tokencount\" 
value=\""+Integer.toString(k)+"\"/>\n"
       );
     }
 
@@ -2612,7 +2619,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString(locale,"DCTM.DocumentTypes")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.DocumentTypes")) && 
connectionSequenceNumber == actualSequenceNumber)
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2637,13 +2644,13 @@ public class DCTM extends org.apache.man
             if (o == null)
             {
               out.print(
-"      <input type=\"checkbox\" name=\"specfiletype\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(strObjectType)+"</input>\n"
+"      <input type=\"checkbox\" name=\""+seqPrefix+"specfiletype\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(strObjectType)+"</input>\n"
               );
             }
             else
             {
               out.print(
-"      <input type=\"checkbox\" name=\"specfiletype\" checked=\"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(strObjectType)+"</input>\n"
+"      <input type=\"checkbox\" name=\""+seqPrefix+"specfiletype\" 
checked=\"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(strObjectType)+"</input>\n"
               );
 
             }
@@ -2664,8 +2671,8 @@ public class DCTM extends org.apache.man
               attrMap = (HashMap)o;
             }
             out.print(
-"      <input type=\"checkbox\" 
name=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape("specfileallattrs_"+strObjectType)+"\"
 value=\"true\" "+(isAll?"checked=\"\"":"")+"/>&nbsp;All metadata<br/>\n"+
-"      <select multiple=\"true\" 
name=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape("specfileattrs_"+strObjectType)+"\"
 size=\"3\">\n"
+"      <input type=\"checkbox\" 
name=\""+seqPrefix+"specfileallattrs_"+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\"
 value=\"true\" "+(isAll?"checked=\"\"":"")+"/>&nbsp;All metadata<br/>\n"+
+"      <select multiple=\"true\" 
name=\""+seqPrefix+"specfileattrs_"+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\"
 size=\"3\">\n"
             );
             // Get the attributes for this data type
             String[] values = getIngestableAttributes(strObjectType);
@@ -2728,13 +2735,13 @@ public class DCTM extends org.apache.man
         String strObjectType = (String)iter.next();
         Object o = dtMap.get(strObjectType);
         out.print(
-"<input type=\"hidden\" name=\"specfiletype\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"specfiletype\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\"/>\n"
         );
         if (o instanceof Boolean)
         {
           Boolean b = (Boolean)o;
           out.print(
-"<input type=\"hidden\" 
name=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape("specfileallattrs_"+strObjectType)+"\"
 value=\""+(b.booleanValue()?"true":"false")+"\"/>\n"
+"<input type=\"hidden\" 
name=\""+seqPrefix+"specfileallattrs_"+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\"
 value=\""+(b.booleanValue()?"true":"false")+"\"/>\n"
           );
         }
         else
@@ -2745,7 +2752,7 @@ public class DCTM extends org.apache.man
           {
             String attrName = (String)iter2.next();
             out.print(
-"<input type=\"hidden\" 
name=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape("specfileattrs_"+strObjectType)+"\"
 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(attrName)+"\"/>\n"
+"<input type=\"hidden\" 
name=\""+seqPrefix+"specfileattrs_"+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strObjectType)+"\"
 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(attrName)+"\"/>\n"
             );
           }
         }
@@ -2772,7 +2779,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString(locale,"DCTM.ContentTypes")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.ContentTypes")) && 
connectionSequenceNumber == actualSequenceNumber)
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2795,13 +2802,13 @@ public class DCTM extends org.apache.man
             if (ctMap == null || ctMap.get(strMimeType) != null)
             {
               out.print(
-"      <input type=\"checkbox\" name=\"specmimetype\" checked=\"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strMimeType)+"\"></input>\n"
+"      <input type=\"checkbox\" name=\""+seqPrefix+"specmimetype\" 
checked=\"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strMimeType)+"\"></input>\n"
               );
             }
             else
             {
               out.print(
-"      <input type=\"checkbox\" name=\"specmimetype\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strMimeType)+"\"></input>\n"
+"      <input type=\"checkbox\" name=\""+seqPrefix+"specmimetype\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strMimeType)+"\"></input>\n"
               );
             }
             out.print(
@@ -2847,7 +2854,7 @@ public class DCTM extends org.apache.man
         {
           String strMimeType = (String)iter.next();
           out.print(
-"<input type=\"hidden\" name=\"specmimetype\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strMimeType)+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"specmimetype\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(strMimeType)+"\"/>\n"
           );
         }
       }
@@ -2868,7 +2875,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString(locale,"DCTM.ContentLength")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.ContentLength")) && 
connectionSequenceNumber == actualSequenceNumber)
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2878,7 +2885,7 @@ public class DCTM extends org.apache.man
 "  <tr>\n"+
 "    <td class=\"description\"><nobr>" + 
Messages.getBodyString(locale,"DCTM.ContentLength") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
-"      <input name=\"specmaxdoclength\" type=\"text\" size=\"10\" 
value=\""+maxDocLength+"\"/>\n"+
+"      <input name=\""+seqPrefix+"specmaxdoclength\" type=\"text\" size=\"10\" 
value=\""+maxDocLength+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "</table>\n"
@@ -2887,7 +2894,7 @@ public class DCTM extends org.apache.man
     else
     {
       out.print(
-"<input type=\"hidden\" name=\"specmaxdoclength\" 
value=\""+maxDocLength+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"specmaxdoclength\" 
value=\""+maxDocLength+"\"/>\n"
       );
     }
 
@@ -2920,18 +2927,18 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString(locale,"DCTM.PathMetadata")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.PathMetadata")) && 
connectionSequenceNumber == actualSequenceNumber)
     {
       out.print(
-"<input type=\"hidden\" name=\"specmappingcount\" 
value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n"+
-"<input type=\"hidden\" name=\"specmappingop\" value=\"\"/>\n"+
+"<input type=\"hidden\" name=\""+seqPrefix+"specmappingcount\" 
value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n"+
+"<input type=\"hidden\" name=\""+seqPrefix+"specmappingop\" value=\"\"/>\n"+
 "\n"+
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"4\"><hr/></td></tr>\n"+
 "  <tr>\n"+
 "    <td class=\"description\" colspan=\"1\"><nobr>" + 
Messages.getBodyString(locale,"DCTM.PathAttributeName") + "</nobr></td>\n"+
 "    <td class=\"value\" colspan=\"3\">\n"+
-"      <input type=\"text\" name=\"specpathnameattribute\" size=\"20\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/>\n"+
+"      <input type=\"text\" name=\""+seqPrefix+"specpathnameattribute\" 
size=\"20\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr><td class=\"separator\" colspan=\"4\"><hr/></td></tr>\n"
@@ -2943,14 +2950,14 @@ public class DCTM extends org.apache.man
         String replaceString = matchMap.getReplaceString(i);
         out.print(
 "  <tr>\n"+
-"    <td class=\"description\"><input type=\"hidden\" 
name=\""+"specmappingop_"+Integer.toString(i)+"\" value=\"\"/>\n"+
-"      <a name=\""+"mapping_"+Integer.toString(i)+"\">\n"+
-"        <input type=\"button\" 
onClick='Javascript:SpecOp(\"specmappingop_"+Integer.toString(i)+"\",\"" + 
Messages.getAttributeJavascriptString(locale,"DCTM.Delete") + 
"\",\"mapping_"+Integer.toString(i)+"\")' alt=\"" + 
Messages.getAttributeString(locale,"DCTM.DeleteMapping") + 
Integer.toString(i)+"\" value=\"Delete\"/>\n"+
+"    <td class=\"description\"><input type=\"hidden\" 
name=\""+seqPrefix+"specmappingop_"+Integer.toString(i)+"\" value=\"\"/>\n"+
+"      <a name=\""+seqPrefix+"mapping_"+Integer.toString(i)+"\">\n"+
+"        <input type=\"button\" 
onClick='Javascript:"+seqPrefix+"SpecOp(\""+seqPrefix+"specmappingop_"+Integer.toString(i)+"\",\""
 + Messages.getAttributeJavascriptString(locale,"DCTM.Delete") + 
"\",\""+seqPrefix+"mapping_"+Integer.toString(i)+"\")' alt=\"" + 
Messages.getAttributeString(locale,"DCTM.DeleteMapping") + 
Integer.toString(i)+"\" value=\"Delete\"/>\n"+
 "      </a>\n"+
 "    </td>\n"+
-"    <td class=\"value\"><input type=\"hidden\" 
name=\"specmatch_"+Integer.toString(i)+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(matchString)+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(matchString)+"</td>\n"+
+"    <td class=\"value\"><input type=\"hidden\" 
name=\""+seqPrefix+"specmatch_"+Integer.toString(i)+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(matchString)+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(matchString)+"</td>\n"+
 "    <td class=\"value\">==></td>\n"+
-"    <td class=\"value\"><input type=\"hidden\" 
name=\"specreplace_"+Integer.toString(i)+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(replaceString)+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(replaceString)+"</td>\n"+
+"    <td class=\"value\"><input type=\"hidden\" 
name=\""+seqPrefix+"specreplace_"+Integer.toString(i)+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(replaceString)+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(replaceString)+"</td>\n"+
 "  </tr>\n"
         );
         i++;
@@ -2966,13 +2973,13 @@ public class DCTM extends org.apache.man
 "\n"+
 "  <tr>\n"+
 "    <td class=\"description\">\n"+
-"      <a name=\""+"mapping_"+Integer.toString(i)+"\">\n"+
-"        <input type=\"button\" 
onClick='Javascript:SpecAddMapping(\"mapping_"+Integer.toString(i+1)+"\")' 
alt=\"" + Messages.getAttributeString(locale,"DCTM.AddToMappings") + "\" 
value=\"" + Messages.getAttributeString(locale,"DCTM.Add") + "\"/>\n"+
+"      <a name=\""+seqPrefix+"mapping_"+Integer.toString(i)+"\">\n"+
+"        <input type=\"button\" 
onClick='Javascript:"+seqPrefix+"SpecAddMapping(\""+seqPrefix+"mapping_"+Integer.toString(i+1)+"\")'
 alt=\"" + Messages.getAttributeString(locale,"DCTM.AddToMappings") + "\" 
value=\"" + Messages.getAttributeString(locale,"DCTM.Add") + "\"/>\n"+
 "      </a>\n"+
 "    </td>\n"+
-"    <td class=\"value\">" + Messages.getBodyString(locale,"DCTM.MatchRegexp") 
+ "&nbsp;<input type=\"text\" name=\"specmatch\" size=\"32\" 
value=\"\"/></td>\n"+
+"    <td class=\"value\">" + Messages.getBodyString(locale,"DCTM.MatchRegexp") 
+ "&nbsp;<input type=\"text\" name=\""+seqPrefix+"specmatch\" size=\"32\" 
value=\"\"/></td>\n"+
 "    <td class=\"value\">==></td>\n"+
-"    <td class=\"value\">" + 
Messages.getBodyString(locale,"DCTM.ReplaceString") + "&nbsp;<input 
type=\"text\" name=\"specreplace\" size=\"32\" value=\"\"/></td>\n"+
+"    <td class=\"value\">" + 
Messages.getBodyString(locale,"DCTM.ReplaceString") + "&nbsp;<input 
type=\"text\" name=\""+seqPrefix+"specreplace\" size=\"32\" 
value=\"\"/></td>\n"+
 "  </tr>\n"+
 "</table>\n"
       );
@@ -2980,8 +2987,8 @@ public class DCTM extends org.apache.man
     else
     {
       out.print(
-"<input type=\"hidden\" name=\"specmappingcount\" 
value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n"+
-"<input type=\"hidden\" name=\"specpathnameattribute\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"specmappingcount\" 
value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n"+
+"<input type=\"hidden\" name=\""+seqPrefix+"specpathnameattribute\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/>\n"
       );
       i = 0;
       while (i < matchMap.getMatchCount())
@@ -2989,8 +2996,8 @@ public class DCTM extends org.apache.man
         String matchString = matchMap.getMatchString(i);
         String replaceString = matchMap.getReplaceString(i);
         out.print(
-"<input type=\"hidden\" name=\""+"specmatch_"+Integer.toString(i)+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(matchString)+"\"/>\n"+
-"<input type=\"hidden\" name=\""+"specreplace_"+Integer.toString(i)+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(replaceString)+"\"/>\n"
+"<input type=\"hidden\" 
name=\""+seqPrefix+"specmatch_"+Integer.toString(i)+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(matchString)+"\"/>\n"+
+"<input type=\"hidden\" 
name=\""+seqPrefix+"specreplace_"+Integer.toString(i)+"\" 
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(replaceString)+"\"/>\n"
         );
         i++;
       }
@@ -3014,7 +3021,9 @@ public class DCTM extends org.apache.man
     int connectionSequenceNumber)
     throws ManifoldCFException
   {
-    String x = variableContext.getParameter("pathcount");
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
+    String x = variableContext.getParameter(seqPrefix+"pathcount");
     if (x != null)
     {
       // Delete all path specs first
@@ -3035,7 +3044,8 @@ public class DCTM extends org.apache.man
       while (i < pathCount)
       {
        String pathDescription = "_"+Integer.toString(i);
-       String pathOpName = "pathop"+pathDescription;
+       String pathOpName = seqPrefix+"pathop"+pathDescription;
+        String pathName = seqPrefix+"specpath"+pathDescription;
        x = variableContext.getParameter(pathOpName);
        if (x != null && x.equals("Delete"))
        {
@@ -3044,7 +3054,7 @@ public class DCTM extends org.apache.man
           continue;
        }
        // Path inserts won't happen until the very end
-       String path = variableContext.getParameter("specpath"+pathDescription);
+       String path = variableContext.getParameter(pathName);
        SpecificationNode node = new SpecificationNode(CONFIG_PARAM_LOCATION);
        node.setAttribute("path",path);
        ds.addChild(ds.getChildCount(),node);
@@ -3052,10 +3062,10 @@ public class DCTM extends org.apache.man
       }
 
       // See if there's a global add operation
-      String op = variableContext.getParameter("pathop");
+      String op = variableContext.getParameter(seqPrefix+"pathop");
       if (op != null && op.equals("Add"))
       {
-       String path = variableContext.getParameter("specpath");
+       String path = variableContext.getParameter(seqPrefix+"specpath");
        SpecificationNode node = new SpecificationNode(CONFIG_PARAM_LOCATION);
        node.setAttribute("path",path);
        ds.addChild(ds.getChildCount(),node);
@@ -3063,18 +3073,18 @@ public class DCTM extends org.apache.man
       else if (op != null && op.equals("Up"))
       {
        // Strip off end
-       String path = variableContext.getParameter("specpath");
+       String path = variableContext.getParameter(seqPrefix+"specpath");
        int k = path.lastIndexOf("/");
        if (k != -1)
           path = path.substring(0,k);
        if (path.length() == 0)
           path = "/";
-       currentContext.save("specpath",path);
+       currentContext.save(seqPrefix+"specpath",path);
       }
       else if (op != null && op.equals("AddToPath"))
       {
-       String path = variableContext.getParameter("specpath");
-       String addon = variableContext.getParameter("pathaddon");
+       String path = variableContext.getParameter(seqPrefix+"specpath");
+       String addon = variableContext.getParameter(seqPrefix+"pathaddon");
        if (addon != null && addon.length() > 0)
        {
           if (path.length() == 1)
@@ -3082,11 +3092,11 @@ public class DCTM extends org.apache.man
           else
             path += "/" + addon;
        }
-       currentContext.save("specpath",path);
+       currentContext.save(seqPrefix+"specpath",path);
       }
     }
 
-    x = variableContext.getParameter("specsecurity");
+    x = variableContext.getParameter(seqPrefix+"specsecurity");
     if (x != null)
     {
       // Delete all security entries first
@@ -3106,7 +3116,7 @@ public class DCTM extends org.apache.man
 
     }
 
-    x = variableContext.getParameter("tokencount");
+    x = variableContext.getParameter(seqPrefix+"tokencount");
     if (x != null)
     {
       // Delete all file specs first
@@ -3125,7 +3135,7 @@ public class DCTM extends org.apache.man
       while (i < accessCount)
       {
        String accessDescription = "_"+Integer.toString(i);
-       String accessOpName = "accessop"+accessDescription;
+       String accessOpName = seqPrefix+"accessop"+accessDescription;
        x = variableContext.getParameter(accessOpName);
        if (x != null && x.equals("Delete"))
        {
@@ -3134,24 +3144,24 @@ public class DCTM extends org.apache.man
           continue;
        }
        // Get the stuff we need
-       String accessSpec = 
variableContext.getParameter("spectoken"+accessDescription);
+       String accessSpec = 
variableContext.getParameter(seqPrefix+"spectoken"+accessDescription);
        SpecificationNode node = new SpecificationNode("access");
        node.setAttribute("token",accessSpec);
        ds.addChild(ds.getChildCount(),node);
        i++;
       }
 
-      String op = variableContext.getParameter("accessop");
+      String op = variableContext.getParameter(seqPrefix+"accessop");
       if (op != null && op.equals("Add"))
       {
-       String accessspec = variableContext.getParameter("spectoken");
+       String accessspec = variableContext.getParameter(seqPrefix+"spectoken");
        SpecificationNode node = new SpecificationNode("access");
        node.setAttribute("token",accessspec);
        ds.addChild(ds.getChildCount(),node);
       }
     }
 
-    String[] y = variableContext.getParameterValues("specfiletype");
+    String[] y = variableContext.getParameterValues(seqPrefix+"specfiletype");
     if (y != null)
     {
       // Delete all file specs first
@@ -3172,10 +3182,10 @@ public class DCTM extends org.apache.man
        String fileType = y[i++];
        SpecificationNode node = new SpecificationNode(CONFIG_PARAM_OBJECTTYPE);
        node.setAttribute("token",fileType);
-       String isAll = 
variableContext.getParameter("specfileallattrs_"+fileType);
+       String isAll = 
variableContext.getParameter(seqPrefix+"specfileallattrs_"+fileType);
        if (isAll != null)
           node.setAttribute("all",isAll);
-       String[] z = 
variableContext.getParameterValues("specfileattrs_"+fileType);
+       String[] z = 
variableContext.getParameterValues(seqPrefix+"specfileattrs_"+fileType);
        if (z != null)
        {
           int k = 0;
@@ -3190,7 +3200,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    y = variableContext.getParameterValues("specmimetype");
+    y = variableContext.getParameterValues(seqPrefix+"specmimetype");
     if (y != null)
     {
       // Delete all file specs first
@@ -3215,7 +3225,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    x = variableContext.getParameter("specmaxdoclength");
+    x = variableContext.getParameter(seqPrefix+"specmaxdoclength");
     if (x != null)
     {
       // Delete all security entries first
@@ -3237,7 +3247,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    String xc = variableContext.getParameter("specpathnameattribute");
+    String xc = 
variableContext.getParameter(seqPrefix+"specpathnameattribute");
     if (xc != null)
     {
       // Delete old one
@@ -3258,7 +3268,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    xc = variableContext.getParameter("specmappingcount");
+    xc = variableContext.getParameter(seqPrefix+"specmappingcount");
     if (xc != null)
     {
       // Delete old spec
@@ -3280,7 +3290,7 @@ public class DCTM extends org.apache.man
       while (i < mappingCount)
       {
        String pathDescription = "_"+Integer.toString(i);
-       String pathOpName = "specmappingop"+pathDescription;
+       String pathOpName = seqPrefix+"specmappingop"+pathDescription;
        xc = variableContext.getParameter(pathOpName);
        if (xc != null && xc.equals("Delete"))
        {
@@ -3289,8 +3299,8 @@ public class DCTM extends org.apache.man
           continue;
        }
        // Inserts won't happen until the very end
-       String match = 
variableContext.getParameter("specmatch"+pathDescription);
-       String replace = 
variableContext.getParameter("specreplace"+pathDescription);
+       String match = 
variableContext.getParameter(seqPrefix+"specmatch"+pathDescription);
+       String replace = 
variableContext.getParameter(seqPrefix+"specreplace"+pathDescription);
        SpecificationNode node = new SpecificationNode(CONFIG_PARAM_PATHMAP);
        node.setAttribute("match",match);
        node.setAttribute("replace",replace);
@@ -3299,11 +3309,11 @@ public class DCTM extends org.apache.man
       }
 
       // Check for add
-      xc = variableContext.getParameter("specmappingop");
+      xc = variableContext.getParameter(seqPrefix+"specmappingop");
       if (xc != null && xc.equals("Add"))
       {
-       String match = variableContext.getParameter("specmatch");
-       String replace = variableContext.getParameter("specreplace");
+       String match = variableContext.getParameter(seqPrefix+"specmatch");
+       String replace = variableContext.getParameter(seqPrefix+"specreplace");
        SpecificationNode node = new SpecificationNode(CONFIG_PARAM_PATHMAP);
        node.setAttribute("match",match);
        node.setAttribute("replace",replace);

Modified: 
manifoldcf/trunk/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
 (original)
+++ 
manifoldcf/trunk/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
 Fri Sep  5 16:48:06 2014
@@ -559,6 +559,7 @@ public class DropboxRepositoryConnector 
     throws ManifoldCFException, IOException {
 
     Map<String, Object> paramMap = new HashMap<String, Object>();
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
 
     // Fill in the map with data from all tabs
     fillInDropboxPathSpecificationMap(paramMap, ds);
@@ -583,7 +584,9 @@ public class DropboxRepositoryConnector 
   public String processSpecificationPost(IPostParameters variableContext, 
Locale locale, Specification ds,
     int connectionSequenceNumber)
     throws ManifoldCFException {
-    String dropboxPath = variableContext.getParameter("dropboxpath");
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
+    String dropboxPath = variableContext.getParameter(seqPrefix+"dropboxpath");
     if (dropboxPath != null) {
       int i = 0;
       while (i < ds.getChildCount()) {
@@ -598,7 +601,7 @@ public class DropboxRepositoryConnector 
       node.setAttribute(JOB_PATH_ATTRIBUTE, dropboxPath);
       ds.addChild(ds.getChildCount(), node);
     }
-    String xc = variableContext.getParameter("tokencount");
+    String xc = variableContext.getParameter(seqPrefix+"tokencount");
     if (xc != null) {
       // Delete all tokens first
       int i = 0;
@@ -614,7 +617,7 @@ public class DropboxRepositoryConnector 
       i = 0;
       while (i < accessCount) {
         String accessDescription = "_"+Integer.toString(i);
-        String accessOpName = "accessop"+accessDescription;
+        String accessOpName = seqPrefix+"accessop"+accessDescription;
         xc = variableContext.getParameter(accessOpName);
         if (xc != null && xc.equals("Delete")) {
           // Next row
@@ -622,17 +625,17 @@ public class DropboxRepositoryConnector 
           continue;
         }
         // Get the stuff we need
-        String accessSpec = 
variableContext.getParameter("spectoken"+accessDescription);
+        String accessSpec = 
variableContext.getParameter(seqPrefix+"spectoken"+accessDescription);
         SpecificationNode node = new SpecificationNode(JOB_ACCESS_NODE_TYPE);
         node.setAttribute(JOB_TOKEN_ATTRIBUTE,accessSpec);
         ds.addChild(ds.getChildCount(),node);
         i++;
       }
 
-      String op = variableContext.getParameter("accessop");
+      String op = variableContext.getParameter(seqPrefix+"accessop");
       if (op != null && op.equals("Add"))
       {
-        String accessspec = variableContext.getParameter("spectoken");
+        String accessspec = 
variableContext.getParameter(seqPrefix+"spectoken");
         SpecificationNode node = new SpecificationNode(JOB_ACCESS_NODE_TYPE);
         node.setAttribute(JOB_TOKEN_ATTRIBUTE,accessspec);
         ds.addChild(ds.getChildCount(),node);
@@ -664,6 +667,9 @@ public class DropboxRepositoryConnector 
     // Output DROPBOXPath tab
     Map<String, Object> paramMap = new HashMap<String, Object>();
     paramMap.put("TabName", tabName);
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
+    paramMap.put("SelectedNum", Integer.toString(actualSequenceNumber));
+
     fillInDropboxPathSpecificationMap(paramMap, ds);
     fillInDropboxSecuritySpecificationMap(paramMap, ds);
 
@@ -690,6 +696,7 @@ public class DropboxRepositoryConnector 
     tabsArray.add(Messages.getString(locale, DROPBOX_SECURITY_TAB_PROPERTY));
 
     Map<String, Object> paramMap = new HashMap<String, Object>();
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
 
     // Fill in the specification header map, using data from all tabs.
     fillInDropboxPathSpecificationMap(paramMap, ds);

Modified: 
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification.js
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification.js?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification.js
 (original)
+++ 
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification.js
 Fri Sep  5 16:48:06 2014
@@ -17,42 +17,37 @@
 
 <script type="text/javascript">
 <!--
-function checkSpecification()
+function s${SeqNum}_checkSpecificationForSave()
 {
-  return true;
-}
- 
-function checkSpecificationForSave()
-{
-  if(editjob.dropboxpath.value == "") {
+  if(editjob.s${SeqNum}_dropboxpath.value == "") {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('DropboxRepositoryConnector.PathMustNotBeNull'))");
-    
SelectTab("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('DropboxRepositoryConnector.Server'))");
-    editjob.dropboxpath.focus();
+    
SelectSequencedTab("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('DropboxRepositoryConnector.Server'))",${SEQNUM});
+    editjob.s${SeqNum}_dropboxpath.focus();
     return false;
   }
   return true;
 }
  
-function SpecOp(n, opValue, anchorvalue)
+function s${SeqNum}_SpecOp(n, opValue, anchorvalue)
 {
   eval("editjob."+n+".value = \""+opValue+"\"");
   postFormSetAnchor(anchorvalue);
 }
 
-function SpecDeleteToken(i)
+function s${SeqNum}_SpecDeleteToken(i)
 {
-  SpecOp("accessop_"+i,"Delete","token_"+i);
+  s${SeqNum}_SpecOp("s${SeqNum}_accessop_"+i,"Delete","s${SeqNum}_token_"+i);
 }
 
-function SpecAddToken(i)
+function s${SeqNum}_SpecAddToken(i)
 {
-  if (editjob.spectoken.value == "")
+  if (editjob.s${SeqNum}_spectoken.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('DropboxRepositoryConnector.TypeInAnAccessToken'))");
-    editjob.spectoken.focus();
+    editjob.s${SeqNum}_spectoken.focus();
     return;
   }
-  SpecOp("accessop","Add","token_"+i);
+  s${SeqNum}_SpecOp("s${SeqNum}_accessop","Add","s${SeqNum}_token_"+i);
 }
 
 //-->

Modified: 
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_DropboxPath.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_DropboxPath.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_DropboxPath.html
 (original)
+++ 
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_DropboxPath.html
 Fri Sep  5 16:48:06 2014
@@ -14,7 +14,7 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-#if($TabName == 
$ResourceBundle.getString('DropboxRepositoryConnector.DropboxPath'))
+#if($TabName == 
$ResourceBundle.getString('DropboxRepositoryConnector.DropboxPath') && 
${SeqNum} == ${SelectedNum})
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
@@ -23,14 +23,14 @@
       
<nobr>$Encoder.bodyEscape($ResourceBundle.getString('DropboxRepositoryConnector.DropboxPathColon'))</nobr>
     </td>
     <td class="value">
-      <nobr><input type="text" size="80" name="dropboxpath" 
value="$Encoder.attributeEscape($DROPBOXPATH)" /></nobr>
+      <nobr><input type="text" size="80" name="s${SeqNum}_dropboxpath" 
value="$Encoder.attributeEscape($DROPBOXPATH)" /></nobr>
     </td>
   </tr>
 </table>
 
 #else
 
-<input type="hidden" name="dropboxpath" 
value="$Encoder.attributeEscape($DROPBOXPATH)" />
+<input type="hidden" name="s${SeqNum}_dropboxpath" 
value="$Encoder.attributeEscape($DROPBOXPATH)" />
 
 #end
 

Modified: 
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_Security.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_Security.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_Security.html
 (original)
+++ 
manifoldcf/trunk/connectors/dropbox/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/dropbox/editSpecification_Security.html
 Fri Sep  5 16:48:06 2014
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-#if($TabName == 
$ResourceBundle.getString('DropboxRepositoryConnector.Security'))
+#if($TabName == 
$ResourceBundle.getString('DropboxRepositoryConnector.Security') && ${SeqNum} 
== ${SelectedNum})
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
@@ -25,10 +25,10 @@
 
   <tr>
     <td class="description">
-      <input type="hidden" name="accessop_$atcounter" value=""/>
-      <input type="hidden" name="spectoken_$atcounter" 
value="$Encoder.attributeEscape($atoken.get('TOKEN'))"/>
-      <a name="token_$atcounter">
-        <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('DropboxRepositoryConnector.Delete'))"
 onClick='Javascript:SpecDeleteToken($atcounter)' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('DropboxRepositoryConnector.DeleteToken'))$atcounter"/>
+      <input type="hidden" name="s${SeqNum}_accessop_$atcounter" value=""/>
+      <input type="hidden" name="s${SeqNum}_spectoken_$atcounter" 
value="$Encoder.attributeEscape($atoken.get('TOKEN'))"/>
+      <a name="s${SeqNum}_token_$atcounter">
+        <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('DropboxRepositoryConnector.Delete'))"
 onClick='Javascript:s${SeqNum}_SpecDeleteToken($atcounter)' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('DropboxRepositoryConnector.DeleteToken'))$atcounter"/>
       </a>
     </td>
     <td class="value">$Encoder.bodyEscape($atoken.get('TOKEN'))</td>
@@ -49,14 +49,14 @@
   
   <tr>
     <td class="description">
-      <input type="hidden" name="tokencount" value="$atcounter"/>
-      <input type="hidden" name="accessop" value=""/>
-      <a name="token_$atcounter">
-        <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('DropboxRepositoryConnector.Add'))"
 onClick='Javascript:SpecAddToken($nexttoken)' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('DropboxRepositoryConnector.AddAccessToken'))"/>
+      <input type="hidden" name="s${SeqNum}_tokencount" value="$atcounter"/>
+      <input type="hidden" name="s${SeqNum}_accessop" value=""/>
+      <a name="s${SeqNum}_token_$atcounter">
+        <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('DropboxRepositoryConnector.Add'))"
 onClick='Javascript:s${SeqNum}_SpecAddToken($nexttoken)' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('DropboxRepositoryConnector.AddAccessToken'))"/>
       </a>
     </td>
     <td class="value">
-      <input type="text" size="30" name="spectoken" value=""/>
+      <input type="text" size="30" name="s${SeqNum}_spectoken" value=""/>
     </td>
   </tr>
 </table>
@@ -65,9 +65,9 @@
 
   #set($atcounter = 0)
   #foreach($atoken in $ACCESSTOKENS)
-<input type="hidden" name="spectoken_$atcounter" 
value="$Encoder.attributeEscape($atoken.get('TOKEN'))"/>
+<input type="hidden" name="s${SeqNum}_spectoken_$atcounter" 
value="$Encoder.attributeEscape($atoken.get('TOKEN'))"/>
     #set($atcounter = $atcounter + 1)
   #end
-<input type="hidden" name="tokencount" value="$atcounter"/>
+<input type="hidden" name="s${SeqNum}_tokencount" value="$atcounter"/>
 
 #end

Modified: 
manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
 (original)
+++ 
manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
 Fri Sep  5 16:48:06 2014
@@ -875,10 +875,12 @@ public class EmailConnector extends org.
   public void outputSpecificationHeader(IHTTPOutput out, Locale locale, 
Specification ds,
     int connectionSequenceNumber, List<String> tabsArray)
     throws ManifoldCFException, IOException {
+    Map<String, Object> paramMap = new HashMap<String, Object>();
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
     // Add the tabs
     tabsArray.add(Messages.getString(locale, "EmailConnector.Metadata"));
     tabsArray.add(Messages.getString(locale, "EmailConnector.Filter"));
-    Messages.outputResourceWithVelocity(out, locale, "SpecificationHeader.js", 
null);
+    Messages.outputResourceWithVelocity(out, locale, "SpecificationHeader.js", 
paramMap);
   }
 
   /** Output the specification body section.
@@ -899,18 +901,20 @@ public class EmailConnector extends org.
   public void outputSpecificationBody(IHTTPOutput out, Locale locale, 
Specification ds,
     int connectionSequenceNumber, int actualSequenceNumber, String tabName)
     throws ManifoldCFException, IOException {
-    outputFilterTab(out, locale, ds, tabName);
-    outputMetadataTab(out, locale, ds, tabName);
+    outputFilterTab(out, locale, ds, tabName, connectionSequenceNumber, 
actualSequenceNumber);
+    outputMetadataTab(out, locale, ds, tabName, connectionSequenceNumber, 
actualSequenceNumber);
   }
 
   /**
 * Take care of "Metadata" tab.
 */
   protected void outputMetadataTab(IHTTPOutput out, Locale locale,
-    Specification ds, String tabName)
+    Specification ds, String tabName, int connectionSequenceNumber, int 
actualSequenceNumber)
     throws ManifoldCFException, IOException {
     Map<String, Object> paramMap = new HashMap<String, Object>();
     paramMap.put("TabName", tabName);
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
+    paramMap.put("SelectedNum", Integer.toString(actualSequenceNumber));
     fillInMetadataTab(paramMap, ds);
     fillInMetadataAttributes(paramMap);
     Messages.outputResourceWithVelocity(out, locale, 
"Specification_Metadata.html", paramMap);
@@ -942,10 +946,12 @@ public class EmailConnector extends org.
   }
 
   protected void outputFilterTab(IHTTPOutput out, Locale locale,
-    Specification ds, String tabName)
+    Specification ds, String tabName, int connectionSequenceNumber, int 
actualSequenceNumber)
     throws ManifoldCFException, IOException {
     Map<String, Object> paramMap = new HashMap<String, Object>();
     paramMap.put("TabName", tabName);
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
+    paramMap.put("SelectedNum", Integer.toString(actualSequenceNumber));
     fillInFilterTab(paramMap, ds);
     if (tabName.equals(Messages.getString(locale, "EmailConnector.Filter")))
       fillInSearchableAttributes(paramMap);
@@ -1014,18 +1020,21 @@ public class EmailConnector extends org.
     int connectionSequenceNumber)
     throws ManifoldCFException {
 
-    String result = processFilterTab(variableContext, ds);
+    String result = processFilterTab(variableContext, ds, 
connectionSequenceNumber);
     if (result != null)
       return result;
-    result = processMetadataTab(variableContext, ds);
+    result = processMetadataTab(variableContext, ds, connectionSequenceNumber);
     return result;
   }
 
 
-  protected String processFilterTab(IPostParameters variableContext, 
Specification ds)
-      throws ManifoldCFException {
+  protected String processFilterTab(IPostParameters variableContext, 
Specification ds,
+    int connectionSequenceNumber)
+    throws ManifoldCFException {
 
-    String findCountString = variableContext.getParameter("findcount");
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+      
+    String findCountString = variableContext.getParameter(seqPrefix + 
"findcount");
     if (findCountString != null) {
       int findCount = Integer.parseInt(findCountString);
       
@@ -1036,23 +1045,23 @@ public class EmailConnector extends org.
       while (i < findCount) {
         String suffix = "_" + Integer.toString(i++);
         // Only add the name/value if the item was not deleted.
-        String findParameterOp = variableContext.getParameter("findop" + 
suffix);
+        String findParameterOp = variableContext.getParameter(seqPrefix + 
"findop" + suffix);
         if (findParameterOp == null || !findParameterOp.equals("Delete")) {
-          String findParameterName = variableContext.getParameter("findname" + 
suffix);
-          String findParameterValue = variableContext.getParameter("findvalue" 
+ suffix);
+          String findParameterName = variableContext.getParameter(seqPrefix + 
"findname" + suffix);
+          String findParameterValue = variableContext.getParameter(seqPrefix + 
"findvalue" + suffix);
           addFindParameterNode(ds, findParameterName, findParameterValue);
         }
       }
 
-      String operation = variableContext.getParameter("findop");
+      String operation = variableContext.getParameter(seqPrefix + "findop");
       if (operation != null && operation.equals("Add")) {
-        String findParameterName = variableContext.getParameter("findname");
-        String findParameterValue = variableContext.getParameter("findvalue");
+        String findParameterName = variableContext.getParameter(seqPrefix + 
"findname");
+        String findParameterValue = variableContext.getParameter(seqPrefix + 
"findvalue");
         addFindParameterNode(ds, findParameterName, findParameterValue);
       }
     }
     
-    String[] folders = variableContext.getParameterValues("folders");
+    String[] folders = variableContext.getParameterValues(seqPrefix + 
"folders");
     if (folders != null)
     {
       removeNodes(ds, EmailConfig.NODE_FOLDER);
@@ -1065,13 +1074,17 @@ public class EmailConnector extends org.
   }
 
 
-  protected String processMetadataTab(IPostParameters variableContext, 
Specification ds)
-      throws ManifoldCFException {
+  protected String processMetadataTab(IPostParameters variableContext, 
Specification ds,
+    int connectionSequenceNumber)
+    throws ManifoldCFException {
+      
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
     // Remove old included metadata nodes
     removeNodes(ds, EmailConfig.NODE_METADATA);
 
     // Get the posted metadata values
-    String[] metadataNames = variableContext.getParameterValues("metadata");
+    String[] metadataNames = variableContext.getParameterValues(seqPrefix + 
"metadata");
     if (metadataNames != null) {
       // Add each metadata name as a node to the document specification
       int i = 0;
@@ -1099,6 +1112,7 @@ public class EmailConnector extends org.
     int connectionSequenceNumber)
     throws ManifoldCFException, IOException {
     Map<String, Object> paramMap = new HashMap<String, Object>();
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
     fillInFilterTab(paramMap, ds);
     fillInMetadataTab(paramMap, ds);
     Messages.outputResourceWithVelocity(out, locale, "SpecificationView.html", 
paramMap);

Modified: 
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/SpecificationHeader.js
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/SpecificationHeader.js?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/SpecificationHeader.js
 (original)
+++ 
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/SpecificationHeader.js
 Fri Sep  5 16:48:06 2014
@@ -18,51 +18,51 @@
 <script type="text/javascript">
 <!--
 
-function checkSpecification()
+function s${SeqNum}_checkSpecification()
 {
-  if (checkDocumentsTab() == false)
+  if (s${SeqNum}_checkDocumentsTab() == false)
     return false;
-  if (checkMetadataTab() == false)
+  if (s${SeqNum}_checkMetadataTab() == false)
     return false;
   return true;
 }
  
-function SpecOp(n, opValue, anchorvalue)
+function s${SeqNum}_SpecOp(n, opValue, anchorvalue)
 {
   eval("editjob."+n+".value = \""+opValue+"\"");
   postFormSetAnchor(anchorvalue);
 }
 
-function checkDocumentsTab()
+function s${SeqNum}_checkDocumentsTab()
 {
   return true;
 }
 
-function checkMetadataTab()
+function s${SeqNum}_checkMetadataTab()
 {
   return true;
 }
 
-function FindDelete(n)
+function s${SeqNum}_FindDelete(n)
 {
-  SpecOp("findop_"+n, "Delete", "find_"+n);
+  s${SeqNum}_SpecOp("s${SeqNum}_findop_"+n, "Delete", "s${SeqNum}_find_"+n);
 }
 
-function FindAdd(n)
+function s${SeqNum}_FindAdd(n)
 {
-  if (editjob.findname.value == "")
+  if (editjob.s${SeqNum}_findname.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('EmailConnector.PleaseSelectAMetadataName'))");
-    editjob.findname.focus();
+    editjob.s${SeqNum}_findname.focus();
     return;
   }
-  if (editjob.findvalue.value == "")
+  if (editjob.s${SeqNum}_findvalue.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('EmailConnector.ValueCannotBeBlank'))");
-    editjob.findvalue.focus();
+    editjob.s${SeqNum}_findvalue.focus();
     return;
   }
-  SpecOp("findop", "Add", "find_"+n);
+  s${SeqNum}_SpecOp("s${SeqNum}_findop", "Add", "s${SeqNum}_find_"+n);
 }
 
 //-->

Modified: 
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html
 (original)
+++ 
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html
 Fri Sep  5 16:48:06 2014
@@ -15,7 +15,7 @@ See the License for the specific languag
 limitations under the License.
 -->
 
-#if($TabName == $ResourceBundle.getString('EmailConnector.Filter'))
+#if($TabName == $ResourceBundle.getString('EmailConnector.Filter') && 
${SeqNum} == ${SelectedNum})
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
@@ -25,7 +25,7 @@ limitations under the License.
       
<nobr>$Encoder.bodyEscape($ResourceBundle.getString('EmailConnector.FoldersColon'))</nobr>
     </td>
     <td class="value">
-      <select name="folders" multiple="true" size="4">
+      <select name="s${SeqNum}_folders" multiple="true" size="4">
     #foreach($name in $FOLDERNAMES)
       #if($FOLDERS.contains($name))
         <option value="$Encoder.attributeEscape($name)" 
selected="true">$Encoder.bodyEscape($name)</option>
@@ -38,7 +38,7 @@ limitations under the License.
   #else
     <td class="message" colspan="2">
     #foreach($name in $FOLDERS)
-      <input type="hidden" name="folders" 
value="$Encoder.attributeEscape($name)"/>
+      <input type="hidden" name="s${SeqNum}_folders" 
value="$Encoder.attributeEscape($name)"/>
     #end
       $Encoder.bodyEscape($EXCEPTION)
     </td>
@@ -70,11 +70,11 @@ limitations under the License.
         <tr class="oddformrow">
     #end
           <td class="formcolumncell">
-            <input type="hidden" name="findop_$k" value=""/>
-            <input type="hidden" name="findname_$k" 
value="$Encoder.attributeEscape($match.get('name'))"/>
-            <input type="hidden" name="findvalue_$k" 
value="$Encoder.attributeEscape($match.get('value'))"/>
-            <a name="find_$k">
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('EmailConnector.Delete'))"
 onClick='Javascript:FindDelete("$k")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('EmailConnector.DeleteMatchNumber'))$k"/>
+            <input type="hidden" name="s${SeqNum}_findop_$k" value=""/>
+            <input type="hidden" name="s${SeqNum}_findname_$k" 
value="$Encoder.attributeEscape($match.get('name'))"/>
+            <input type="hidden" name="s${SeqNum}_findvalue_$k" 
value="$Encoder.attributeEscape($match.get('value'))"/>
+            <a name="s${SeqNum}_find_$k">
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('EmailConnector.Delete'))"
 onClick='Javascript:s${SeqNum}_FindDelete("$k")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('EmailConnector.DeleteMatchNumber'))$k"/>
             </a>
           </td>
           <td class="formcolumncell">
@@ -100,15 +100,15 @@ limitations under the License.
         <tr class="formrow">
           <td class="formcolumncell">
             <nobr>
-              <a name="find_$k">
-                <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('EmailConnector.Add'))"
 onClick='Javascript:FindAdd("$nextk")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('EmailConnector.AddNewMatch'))"/>
-                <input type="hidden" name="findcount" value="$k"/>
-                <input type="hidden" name="findop" value=""/>
+              <a name="s${SeqNum}_find_$k">
+                <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('EmailConnector.Add'))"
 onClick='Javascript:s${SeqNum}_FindAdd("$nextk")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('EmailConnector.AddNewMatch'))"/>
+                <input type="hidden" name="s${SeqNum}_findcount" value="$k"/>
+                <input type="hidden" name="s${SeqNum}_findop" value=""/>
               </a>
             </nobr>
           </td>
           <td class="formcolumncell">
-            <select name="findname">
+            <select name="s${SeqNum}_findname">
               <option value="" 
selected="true">$Encoder.bodyEscape($ResourceBundle.getString('EmailConnector.SelectMetadataName'))</option>
   #foreach($name in $SEARCHABLEATTRIBUTES)
               <option 
value="$Encoder.attributeEscape($name)">$Encoder.bodyEscape($name)</option>
@@ -116,7 +116,7 @@ limitations under the License.
             </select>
           </td>
           <td class="formcolumncell">
-            <nobr><input type="text" size="32" name="findvalue" 
value=""/></nobr>
+            <nobr><input type="text" size="32" name="s${SeqNum}_findvalue" 
value=""/></nobr>
           </td>
         </tr>
 
@@ -128,18 +128,18 @@ limitations under the License.
 #else
 
   #foreach($name in $FOLDERS)
-<input type="hidden" name="folders" value="$Encoder.attributeEscape($name)"/>
+<input type="hidden" name="s${SeqNum}_folders" 
value="$Encoder.attributeEscape($name)"/>
   #end
 
   #set($k = 0)
   #foreach($match in $MATCHES)
 
-<input type="hidden" name="findname_$k" 
value="$Encoder.attributeEscape($match.get('name'))"/>
-<input type="hidden" name="findvalue_$k" 
value="$Encoder.attributeEscape($match.get('value'))"/>
+<input type="hidden" name="s${SeqNum}_findname_$k" 
value="$Encoder.attributeEscape($match.get('name'))"/>
+<input type="hidden" name="s${SeqNum}_findvalue_$k" 
value="$Encoder.attributeEscape($match.get('value'))"/>
 
     #set($k = $k + 1)
   #end
 
-<input type="hidden" name="findcount" value="$k"/>
+<input type="hidden" name="s${SeqNum}_findcount" value="$k"/>
 
 #end

Modified: 
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html
 (original)
+++ 
manifoldcf/trunk/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html
 Fri Sep  5 16:48:06 2014
@@ -15,7 +15,7 @@ See the License for the specific languag
 limitations under the License.
 -->
 
-#if($TabName == $ResourceBundle.getString('EmailConnector.Metadata'))
+#if($TabName == $ResourceBundle.getString('EmailConnector.Metadata') && 
${SeqNum} == ${SelectedNum})
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
@@ -24,9 +24,9 @@ limitations under the License.
     <td class="value">
   #foreach($metadataattribute in $METADATAATTRIBUTES)
     #if($METADATASELECTIONS.contains($metadataattribute))
-      <input type="checkbox" name="metadata" 
value="$Encoder.attributeEscape($metadataattribute)" checked="true"/>
+      <input type="checkbox" name="s${SeqNum}_metadata" 
value="$Encoder.attributeEscape($metadataattribute)" checked="true"/>
     #else
-      <input type="checkbox" name="metadata" 
value="$Encoder.attributeEscape($metadataattribute)"/>
+      <input type="checkbox" name="s${SeqNum}_metadata" 
value="$Encoder.attributeEscape($metadataattribute)"/>
     #end
       <nobr>$Encoder.bodyEscape($metadataattribute)</nobr><br/>
   #end
@@ -38,7 +38,7 @@ limitations under the License.
 #else
 
   #foreach($metadataselection in $METADATASELECTIONS)
-<input type="hidden" name="metadata" 
value="$Encoder.attributeEscape($metadataselection)"/>
+<input type="hidden" name="s${SeqNum}_metadata" 
value="$Encoder.attributeEscape($metadataselection)"/>
   #end
   
 #end


Reply via email to