Modified: 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
 (original)
+++ 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
 Fri Sep  5 16:48:06 2014
@@ -2644,7 +2644,10 @@ public class SharePointRepository extend
     tabsArray.add(Messages.getString(locale,"SharePointRepository.Paths"));
     tabsArray.add(Messages.getString(locale,"SharePointRepository.Security"));
     tabsArray.add(Messages.getString(locale,"SharePointRepository.Metadata"));
-    
Messages.outputResourceWithVelocity(out,locale,"editSpecification.js",null);
+    Map<String,Object> velocityContext = new HashMap<String,Object>();
+    velocityContext.put("SeqNum", Integer.toString(connectionSequenceNumber));
+
+    
Messages.outputResourceWithVelocity(out,locale,"editSpecification.js",velocityContext);
   }
   
   /** Output the specification body section.
@@ -2668,16 +2671,18 @@ public class SharePointRepository extend
   {
     Map<String,Object> velocityContext = new HashMap<String,Object>();
     velocityContext.put("TabName",tabName);
-    
+    velocityContext.put("SeqNum", Integer.toString(connectionSequenceNumber));
+    velocityContext.put("SelectedNum", Integer.toString(actualSequenceNumber));
+
     fillInSecurityTab(velocityContext,out,ds);
     fillInPathsTab(velocityContext,out,ds);
     fillInMetadataTab(velocityContext,out,ds);
     
     // Now, do the part of the tabs that requires context logic
     if 
(tabName.equals(Messages.getString(locale,"SharePointRepository.Paths")))
-      fillInTransientPathsInfo(velocityContext);
+      fillInTransientPathsInfo(velocityContext,connectionSequenceNumber);
     else if 
(tabName.equals(Messages.getString(locale,"SharePointRepository.Metadata")))
-      fillInTransientMetadataInfo(velocityContext);
+      fillInTransientMetadataInfo(velocityContext,connectionSequenceNumber);
     
     
Messages.outputResourceWithVelocity(out,locale,"editSpecification_Security.html",velocityContext);
     
Messages.outputResourceWithVelocity(out,locale,"editSpecification_Paths.html",velocityContext);
@@ -2797,16 +2802,18 @@ public class SharePointRepository extend
   }
   
   /** Fill in transient metadata info */
-  protected void fillInTransientMetadataInfo(Map<String,Object> 
velocityContext)
+  protected void fillInTransientMetadataInfo(Map<String,Object> 
velocityContext, int connectionSequenceNumber)
   {
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
     // The following variables may be in the thread context because 
postspec.jsp put them there:
     // (1) "metapath", which contains the rule path as it currently stands;
     // (2) "metapathstate", which describes what the current path represents.  
Values are "unknown", "site", "library".
     // (3) "metapathlibrary" is the library or list path (if this is known 
yet).
     // Once the widget is in the state "unknown", it can only be reset, and 
cannot be further modified
-    String metaPathSoFar = (String)currentContext.get("metapath");
-    String metaPathState = (String)currentContext.get("metapathstate");
-    String metaPathLibrary = (String)currentContext.get("metapathlibrary");
+    String metaPathSoFar = (String)currentContext.get(seqPrefix+"metapath");
+    String metaPathState = 
(String)currentContext.get(seqPrefix+"metapathstate");
+    String metaPathLibrary = 
(String)currentContext.get(seqPrefix+"metapathlibrary");
     if (metaPathState == null)
       metaPathState = "unknown";
     if (metaPathSoFar == null)
@@ -2988,16 +2995,18 @@ public class SharePointRepository extend
   }
   
   /** Fill in the transient portion of the Paths tab */
-  protected void fillInTransientPathsInfo(Map<String,Object> velocityContext)
+  protected void fillInTransientPathsInfo(Map<String,Object> velocityContext, 
int connectionSequenceNumber)
   {
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
     // The following variables may be in the thread context because 
postspec.jsp put them there:
     // (1) "specpath", which contains the rule path as it currently stands;
     // (2) "specpathstate", which describes what the current path represents.  
Values are "unknown", "site", "library", "list".
     // Once the widget is in the state "unknown", it can only be reset, and 
cannot be further modified
     // specsitepath may be in the thread context, put there by postspec.jsp 
-    String pathSoFar = (String)currentContext.get("specpath");
-    String pathState = (String)currentContext.get("specpathstate");
-    String pathLibrary = (String)currentContext.get("specpathlibrary");
+    String pathSoFar = (String)currentContext.get(seqPrefix+"specpath");
+    String pathState = (String)currentContext.get(seqPrefix+"specpathstate");
+    String pathLibrary = 
(String)currentContext.get(seqPrefix+"specpathlibrary");
     if (pathState == null)
     {
       pathState = "unknown";
@@ -3118,8 +3127,10 @@ public class SharePointRepository extend
     int connectionSequenceNumber)
     throws ManifoldCFException
   {
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
     // Remove old-style rules, but only if the information would not be lost
-    if (variableContext.getParameter("specpathcount") != null && 
variableContext.getParameter("metapathcount") != null)
+    if (variableContext.getParameter(seqPrefix+"specpathcount") != null && 
variableContext.getParameter(seqPrefix+"metapathcount") != null)
     {
       int i = 0;
       while (i < ds.getChildCount())
@@ -3132,7 +3143,7 @@ public class SharePointRepository extend
       }
     }
     
-    String x = variableContext.getParameter("specpathcount");
+    String x = variableContext.getParameter(seqPrefix+"specpathcount");
     if (x != null)
     {
       // Delete all path rule entries first
@@ -3153,7 +3164,7 @@ public class SharePointRepository extend
       while (i < pathCount)
       {
         String pathDescription = "_"+Integer.toString(i);
-        String pathOpName = "specop"+pathDescription;
+        String pathOpName = seqPrefix+"specop"+pathDescription;
         x = variableContext.getParameter(pathOpName);
         if (x != null && x.equals("Delete"))
         {
@@ -3163,9 +3174,9 @@ public class SharePointRepository extend
         }
         
         // Get the stored information for this rule.
-        String path = variableContext.getParameter("specpath"+pathDescription);
-        String type = variableContext.getParameter("spectype"+pathDescription);
-        String action = 
variableContext.getParameter("specflav"+pathDescription);
+        String path = 
variableContext.getParameter(seqPrefix+"specpath"+pathDescription);
+        String type = 
variableContext.getParameter(seqPrefix+"spectype"+pathDescription);
+        String action = 
variableContext.getParameter(seqPrefix+"specflav"+pathDescription);
         
         SpecificationNode node = new SpecificationNode("pathrule");
         node.setAttribute("match",path);
@@ -3176,9 +3187,9 @@ public class SharePointRepository extend
         if (x != null && x.equals("Insert Here"))
         {
           // The global parameters are what are used to create the rule
-          path = variableContext.getParameter("specpath");
-          type = variableContext.getParameter("spectype");
-          action = variableContext.getParameter("specflavor");
+          path = variableContext.getParameter(seqPrefix+"specpath");
+          type = variableContext.getParameter(seqPrefix+"spectype");
+          action = variableContext.getParameter(seqPrefix+"specflavor");
           
           SpecificationNode sn = new SpecificationNode("pathrule");
           sn.setAttribute("match",path);
@@ -3192,14 +3203,14 @@ public class SharePointRepository extend
       }
 
       // See if there's a global path rule operation
-      String op = variableContext.getParameter("specop");
+      String op = variableContext.getParameter(seqPrefix+"specop");
       if (op != null)
       {
         if (op.equals("Add"))
         {
-          String match = variableContext.getParameter("specpath");
-          String action = variableContext.getParameter("specflavor");
-          String type = variableContext.getParameter("spectype");
+          String match = variableContext.getParameter(seqPrefix+"specpath");
+          String action = variableContext.getParameter(seqPrefix+"specflavor");
+          String type = variableContext.getParameter(seqPrefix+"spectype");
           SpecificationNode node = new SpecificationNode("pathrule");
           node.setAttribute("match",match);
           node.setAttribute("action",action);
@@ -3209,19 +3220,19 @@ public class SharePointRepository extend
       }
 
       // See if there's a global pathbuilder operation
-      String pathop = variableContext.getParameter("specpathop");
+      String pathop = variableContext.getParameter(seqPrefix+"specpathop");
       if (pathop != null)
       {
         if (pathop.equals("Reset"))
         {
-          currentContext.save("specpath","/");
-          currentContext.save("specpathstate","site");
-          currentContext.save("specpathlibrary",null);
+          currentContext.save(seqPrefix+"specpath","/");
+          currentContext.save(seqPrefix+"specpathstate","site");
+          currentContext.save(seqPrefix+"specpathlibrary",null);
         }
         else if (pathop.equals("AppendSite"))
         {
-          String path = variableContext.getParameter("specpath");
-          String addon = variableContext.getParameter("specsite");
+          String path = variableContext.getParameter(seqPrefix+"specpath");
+          String addon = variableContext.getParameter(seqPrefix+"specsite");
           if (addon != null && addon.length() > 0)
           {
             if (path.equals("/"))
@@ -3229,76 +3240,76 @@ public class SharePointRepository extend
             else
               path = path + "/" + addon;
           }
-          currentContext.save("specpath",path);
-          currentContext.save("specpathstate","site");
-          currentContext.save("specpathlibrary",null);
+          currentContext.save(seqPrefix+"specpath",path);
+          currentContext.save(seqPrefix+"specpathstate","site");
+          currentContext.save(seqPrefix+"specpathlibrary",null);
         }
         else if (pathop.equals("AppendLibrary"))
         {
-          String path = variableContext.getParameter("specpath");
-          String addon = variableContext.getParameter("speclibrary");
+          String path = variableContext.getParameter(seqPrefix+"specpath");
+          String addon = variableContext.getParameter(seqPrefix+"speclibrary");
           if (addon != null && addon.length() > 0)
           {
             if (path.equals("/"))
               path = path + addon;
             else
               path = path + "/" + addon;
-            currentContext.save("specpathstate","library");
-            currentContext.save("specpathlibrary",path);
+            currentContext.save(seqPrefix+"specpathstate","library");
+            currentContext.save(seqPrefix+"specpathlibrary",path);
           }
-          currentContext.save("specpath",path);
+          currentContext.save(seqPrefix+"specpath",path);
         }
         else if (pathop.equals("AppendList"))
         {
-          String path = variableContext.getParameter("specpath");
-          String addon = variableContext.getParameter("speclist");
+          String path = variableContext.getParameter(seqPrefix+"specpath");
+          String addon = variableContext.getParameter(seqPrefix+"speclist");
           if (addon != null && addon.length() > 0)
           {
             if (path.equals("/"))
               path = path + addon;
             else
               path = path + "/" + addon;
-            currentContext.save("specpathstate","list");
-            currentContext.save("specpathlibrary",path);
+            currentContext.save(seqPrefix+"specpathstate","list");
+            currentContext.save(seqPrefix+"specpathlibrary",path);
           }
-          currentContext.save("specpath",path);
+          currentContext.save(seqPrefix+"specpath",path);
         }
         else if (pathop.equals("AppendText"))
         {
-          String path = variableContext.getParameter("specpath");
-          String library = variableContext.getParameter("specpathlibrary");
-          String addon = variableContext.getParameter("specmatch");
+          String path = variableContext.getParameter(seqPrefix+"specpath");
+          String library = 
variableContext.getParameter(seqPrefix+"specpathlibrary");
+          String addon = variableContext.getParameter(seqPrefix+"specmatch");
           if (addon != null && addon.length() > 0)
           {
             if (path.equals("/"))
               path = path + addon;
             else
               path = path + "/" + addon;
-            currentContext.save("specpathstate","unknown");
+            currentContext.save(seqPrefix+"specpathstate","unknown");
           }
-          currentContext.save("specpath",path);
-          currentContext.save("specpathlibrary",library);
+          currentContext.save(seqPrefix+"specpath",path);
+          currentContext.save(seqPrefix+"specpathlibrary",library);
         }
         else if (pathop.equals("Remove"))
         {
           // Strip off end
-          String path = variableContext.getParameter("specpath");
+          String path = variableContext.getParameter(seqPrefix+"specpath");
           int index = path.lastIndexOf("/");
           path = path.substring(0,index);
           if (path.length() == 0)
             path = "/";
-          currentContext.save("specpath",path);
+          currentContext.save(seqPrefix+"specpath",path);
           // Now, adjust state.
-          String pathState = variableContext.getParameter("specpathstate");
+          String pathState = 
variableContext.getParameter(seqPrefix+"specpathstate");
           if (pathState.equals("library") || pathState.equals("list"))
             pathState = "site";
-          currentContext.save("specpathstate",pathState);
+          currentContext.save(seqPrefix+"specpathstate",pathState);
         }
       }
 
     }
     
-    x = variableContext.getParameter("metapathcount");
+    x = variableContext.getParameter(seqPrefix+"metapathcount");
     if (x != null)
     {
       // Delete all metadata rule entries first
@@ -3319,7 +3330,7 @@ public class SharePointRepository extend
       while (i < pathCount)
       {
         String pathDescription = "_"+Integer.toString(i);
-        String pathOpName = "metaop"+pathDescription;
+        String pathOpName = seqPrefix+"metaop"+pathDescription;
         x = variableContext.getParameter(pathOpName);
         if (x != null && x.equals("Delete"))
         {
@@ -3329,10 +3340,10 @@ public class SharePointRepository extend
         }
 
         // Get the stored information for this rule.
-        String path = variableContext.getParameter("metapath"+pathDescription);
-        String action = 
variableContext.getParameter("metaflav"+pathDescription);
-        String allmetadata =  
variableContext.getParameter("metaall"+pathDescription);
-        String[] metadataFields = 
variableContext.getParameterValues("metafields"+pathDescription);
+        String path = 
variableContext.getParameter(seqPrefix+"metapath"+pathDescription);
+        String action = 
variableContext.getParameter(seqPrefix+"metaflav"+pathDescription);
+        String allmetadata =  
variableContext.getParameter(seqPrefix+"metaall"+pathDescription);
+        String[] metadataFields = 
variableContext.getParameterValues(seqPrefix+"metafields"+pathDescription);
         
         SpecificationNode node = new SpecificationNode("metadatarule");
         node.setAttribute("match",path);
@@ -3356,10 +3367,10 @@ public class SharePointRepository extend
         if (x != null && x.equals("Insert Here"))
         {
           // Insert the new global rule information now
-          path = variableContext.getParameter("metapath");
-          action = variableContext.getParameter("metaflavor");
-          allmetadata =  variableContext.getParameter("metaall");
-          metadataFields = variableContext.getParameterValues("metafields");
+          path = variableContext.getParameter(seqPrefix+"metapath");
+          action = variableContext.getParameter(seqPrefix+"metaflavor");
+          allmetadata =  variableContext.getParameter(seqPrefix+"metaall");
+          metadataFields = 
variableContext.getParameterValues(seqPrefix+"metafields");
         
           SpecificationNode sn = new SpecificationNode("metadatarule");
           sn.setAttribute("match",path);
@@ -3388,20 +3399,20 @@ public class SharePointRepository extend
       }
       
       // See if there's a global path rule operation
-      String op = variableContext.getParameter("metaop");
+      String op = variableContext.getParameter(seqPrefix+"metaop");
       if (op != null)
       {
         if (op.equals("Add"))
         {
-          String match = variableContext.getParameter("metapath");
-          String action = variableContext.getParameter("metaflavor");
+          String match = variableContext.getParameter(seqPrefix+"metapath");
+          String action = variableContext.getParameter(seqPrefix+"metaflavor");
           SpecificationNode node = new SpecificationNode("metadatarule");
           node.setAttribute("match",match);
           node.setAttribute("action",action);
           if (action.equals("include"))
           {
-            String allmetadata = variableContext.getParameter("metaall");
-            String[] metadataFields = 
variableContext.getParameterValues("metafields");
+            String allmetadata = 
variableContext.getParameter(seqPrefix+"metaall");
+            String[] metadataFields = 
variableContext.getParameterValues(seqPrefix+"metafields");
             if (allmetadata != null)
               node.setAttribute("allmetadata",allmetadata);
             if (metadataFields != null)
@@ -3421,19 +3432,19 @@ public class SharePointRepository extend
       }
 
       // See if there's a global pathbuilder operation
-      String pathop = variableContext.getParameter("metapathop");
+      String pathop = variableContext.getParameter(seqPrefix+"metapathop");
       if (pathop != null)
       {
         if (pathop.equals("Reset"))
         {
-          currentContext.save("metapath","/");
-          currentContext.save("metapathstate","site");
-          currentContext.save("metapathlibrary",null);
+          currentContext.save(seqPrefix+"metapath","/");
+          currentContext.save(seqPrefix+"metapathstate","site");
+          currentContext.save(seqPrefix+"metapathlibrary",null);
         }
         else if (pathop.equals("AppendSite"))
         {
-          String path = variableContext.getParameter("metapath");
-          String addon = variableContext.getParameter("metasite");
+          String path = variableContext.getParameter(seqPrefix+"metapath");
+          String addon = variableContext.getParameter(seqPrefix+"metasite");
           if (addon != null && addon.length() > 0)
           {
             if (path.equals("/"))
@@ -3441,47 +3452,47 @@ public class SharePointRepository extend
             else
               path = path + "/" + addon;
           }
-          currentContext.save("metapath",path);
-          currentContext.save("metapathstate","site");
-          currentContext.save("metapathlibrary",null);
+          currentContext.save(seqPrefix+"metapath",path);
+          currentContext.save(seqPrefix+"metapathstate","site");
+          currentContext.save(seqPrefix+"metapathlibrary",null);
         }
         else if (pathop.equals("AppendLibrary"))
         {
-          String path = variableContext.getParameter("metapath");
-          String addon = variableContext.getParameter("metalibrary");
+          String path = variableContext.getParameter(seqPrefix+"metapath");
+          String addon = variableContext.getParameter(seqPrefix+"metalibrary");
           if (addon != null && addon.length() > 0)
           {
             if (path.equals("/"))
               path = path + addon;
             else
               path = path + "/" + addon;
-            currentContext.save("metapathstate","library");
-            currentContext.save("metapathlibrary",path);
+            currentContext.save(seqPrefix+"metapathstate","library");
+            currentContext.save(seqPrefix+"metapathlibrary",path);
           }
-          currentContext.save("metapath",path);
+          currentContext.save(seqPrefix+"metapath",path);
         }
         else if (pathop.equals("AppendList"))
         {
-          String path = variableContext.getParameter("metapath");
-          String addon = variableContext.getParameter("metalist");
+          String path = variableContext.getParameter(seqPrefix+"metapath");
+          String addon = variableContext.getParameter(seqPrefix+"metalist");
           if (addon != null && addon.length() > 0)
           {
             if (path.equals("/"))
               path = path + addon;
             else
               path = path + "/" + addon;
-            currentContext.save("metapathstate","list");
-            currentContext.save("metapathlibrary",path);
+            currentContext.save(seqPrefix+"metapathstate","list");
+            currentContext.save(seqPrefix+"metapathlibrary",path);
             // Automatically add on wildcard for list item part of the match
             path += "/*";
           }
-          currentContext.save("metapath",path);
+          currentContext.save(seqPrefix+"metapath",path);
         }
         else if (pathop.equals("AppendText"))
         {
-          String path = variableContext.getParameter("metapath");
-          String library = variableContext.getParameter("metapathlibrary");
-          String addon = variableContext.getParameter("metamatch");
+          String path = variableContext.getParameter(seqPrefix+"metapath");
+          String library = 
variableContext.getParameter(seqPrefix+"metapathlibrary");
+          String addon = variableContext.getParameter(seqPrefix+"metamatch");
           if (addon != null && addon.length() > 0)
           {
             if (path.equals("/"))
@@ -3489,50 +3500,50 @@ public class SharePointRepository extend
             else
               path = path + "/" + addon;
             if (library != null)
-              currentContext.save("metapathstate","file");
+              currentContext.save(seqPrefix+"metapathstate","file");
             else
-              currentContext.save("metapathstate","unknown");
+              currentContext.save(seqPrefix+"metapathstate","unknown");
           }
-          currentContext.save("metapath",path);
-          currentContext.save("metapathlibrary",library);
+          currentContext.save(seqPrefix+"metapath",path);
+          currentContext.save(seqPrefix+"metapathlibrary",library);
         }
         else if (pathop.equals("Remove"))
         {
-          String pathState = variableContext.getParameter("metapathstate");
+          String pathState = 
variableContext.getParameter(seqPrefix+"metapathstate");
           String path;
           if (pathState.equals("file"))
           {
             pathState = "library";
-            path = variableContext.getParameter("metapathlibrary");
+            path = variableContext.getParameter(seqPrefix+"metapathlibrary");
           }
           else if (pathState.equals("list") || pathState.equals("library"))
           {
             pathState = "site";
-            path = variableContext.getParameter("metapathlibrary");
+            path = variableContext.getParameter(seqPrefix+"metapathlibrary");
             int index = path.lastIndexOf("/");
             path = path.substring(0,index);
             if (path.length() == 0)
               path = "/";
-            currentContext.save("metapathlibrary",null);
+            currentContext.save(seqPrefix+"metapathlibrary",null);
           }
           else
           {
-            path = variableContext.getParameter("metapath");
+            path = variableContext.getParameter(seqPrefix+"metapath");
             int index = path.lastIndexOf("/");
             path = path.substring(0,index);
             if (path.length() == 0)
               path = "/";
           }
 
-          currentContext.save("metapathstate",pathState);
-          currentContext.save("metapath",path);
+          currentContext.save(seqPrefix+"metapathstate",pathState);
+          currentContext.save(seqPrefix+"metapath",path);
         }
       }
 
       
     }
 
-    String xc = variableContext.getParameter("specsecurity");
+    String xc = variableContext.getParameter(seqPrefix+"specsecurity");
     if (xc != null)
     {
       // Delete all security entries first
@@ -3552,7 +3563,7 @@ public class SharePointRepository extend
 
     }
    
-    xc = variableContext.getParameter("tokencount");
+    xc = variableContext.getParameter(seqPrefix+"tokencount");
     if (xc != null)
     {
       // Delete all file specs first
@@ -3571,7 +3582,7 @@ public class SharePointRepository extend
       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"))
         {
@@ -3580,24 +3591,24 @@ public class SharePointRepository extend
           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);
       }
     }
 
-    xc = variableContext.getParameter("specpathnameattribute");
+    xc = variableContext.getParameter(seqPrefix+"specpathnameattribute");
     if (xc != null)
     {
       // Delete old one
@@ -3618,7 +3629,7 @@ public class SharePointRepository extend
       }
     }
 
-    xc = variableContext.getParameter("specmappingcount");
+    xc = variableContext.getParameter(seqPrefix+"specmappingcount");
     if (xc != null)
     {
       // Delete old spec
@@ -3640,7 +3651,7 @@ public class SharePointRepository extend
       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"))
         {
@@ -3649,8 +3660,8 @@ public class SharePointRepository extend
           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("pathmap");
         node.setAttribute("match",match);
         node.setAttribute("replace",replace);
@@ -3660,12 +3671,12 @@ public class SharePointRepository extend
       }
 
       // 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");
-        SpecificationNode node = new SpecificationNode("pathmap");
+        String match = variableContext.getParameter(seqPrefix+"specmatch");
+        String replace = variableContext.getParameter(seqPrefix+"specreplace");
+        SpecificationNode node = new SpecificationNode(seqPrefix+"pathmap");
         node.setAttribute("match",match);
         node.setAttribute("replace",replace);
         ds.addChild(ds.getChildCount(),node);
@@ -3690,7 +3701,8 @@ public class SharePointRepository extend
     throws ManifoldCFException, IOException
   {
     Map<String,Object> velocityContext = new HashMap<String,Object>();
-    
+    velocityContext.put("SeqNum", Integer.toString(connectionSequenceNumber));
+
     fillInSecurityTab(velocityContext,out,ds);
     fillInPathsTab(velocityContext,out,ds);
     fillInMetadataTab(velocityContext,out,ds);

Modified: 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification.js
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification.js?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification.js
 (original)
+++ 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification.js
 Fri Sep  5 16:48:06 2014
@@ -18,176 +18,170 @@
 <script type="text/javascript">
 <!--
 
-function checkSpecification()
+function s${SeqNum}_SpecRuleAddPath(anchorvalue)
 {
-  // Does nothing right now.
-  return true;
-}
-
-function SpecRuleAddPath(anchorvalue)
-{
-  if (editjob.spectype.value=="")
+  if (editjob.s${SeqNum}_spectype.value=="")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseSelectATypeFirst'))");
-    editjob.spectype.focus();
+    editjob.s${SeqNum}_spectype.focus();
   }
-  else if (editjob.specflavor.value=="")
+  else if (editjob.s${SeqNum}_specflavor.value=="")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseSelectAnActionFirst'))");
-    editjob.specflavor.focus();
+    editjob.s${SeqNum}_specflavor.focus();
   }
   else
-    SpecOp("specop","Add",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_specop","Add",anchorvalue);
 }
   
-function SpecPathReset(anchorvalue)
+function s${SeqNum}_SpecPathReset(anchorvalue)
 {
   SpecOp("specpathop","Reset",anchorvalue);
 }
   
-function SpecPathAppendSite(anchorvalue)
+function s${SeqNum}_SpecPathAppendSite(anchorvalue)
 {
-  if (editjob.specsite.value == "")
+  if (editjob.s${SeqNum}_specsite.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseSelectASiteFirst'))");
-    editjob.specsite.focus();
+    editjob.s${SeqNum}_specsite.focus();
   }
   else
-    SpecOp("specpathop","AppendSite",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_specpathop","AppendSite",anchorvalue);
 }
 
-function SpecPathAppendLibrary(anchorvalue)
+function s${SeqNum}_SpecPathAppendLibrary(anchorvalue)
 {
-  if (editjob.speclibrary.value == "")
+  if (editjob.s${SeqNum}_speclibrary.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseSelectALibraryFirst'))");
-    editjob.speclibrary.focus();
+    editjob.s${SeqNum}_speclibrary.focus();
   }
   else
-    SpecOp("specpathop","AppendLibrary",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_specpathop","AppendLibrary",anchorvalue);
 }
 
-function SpecPathAppendList(anchorvalue)
+function s${SeqNum}_SpecPathAppendList(anchorvalue)
 {
-  if (editjob.speclist.value == "")
+  if (editjob.s${SeqNum}_speclist.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseSelectAListFirst'))");
-    editjob.speclist.focus();
+    editjob.s${SeqNum}_speclist.focus();
   }
   else
-    SpecOp("specpathop","AppendList",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_specpathop","AppendList",anchorvalue);
 }
 
-function SpecPathAppendText(anchorvalue)
+function s${SeqNum}_SpecPathAppendText(anchorvalue)
 {
-  if (editjob.specmatch.value == "")
+  if (editjob.s${SeqNum}_specmatch.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseProvideMatchTextFirst'))");
-    editjob.specmatch.focus();
+    editjob.s${SeqNum}_specmatch.focus();
   }
   else
-    SpecOp("specpathop","AppendText",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_specpathop","AppendText",anchorvalue);
 }
 
-function SpecPathRemove(anchorvalue)
+function s${SeqNum}_SpecPathRemove(anchorvalue)
 {
-  SpecOp("specpathop","Remove",anchorvalue);
+  s${SeqNum}_SpecOp("s${SeqNum}_specpathop","Remove",anchorvalue);
 }
 
-function MetaRuleAddPath(anchorvalue)
+function s${SeqNum}_MetaRuleAddPath(anchorvalue)
 {
-  if (editjob.metaflavor.value=="")
+  if (editjob.s${SeqNum}_metaflavor.value=="")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseSelectAnActionFirst'))");
-    editjob.metaflavor.focus();
+    editjob.s${SeqNum}_metaflavor.focus();
   }
   else
-    SpecOp("metaop","Add",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_metaop","Add",anchorvalue);
 }
 
-function MetaPathReset(anchorvalue)
+function s${SeqNum}_MetaPathReset(anchorvalue)
 {
-  SpecOp("metapathop","Reset",anchorvalue);
+  s${SeqNum}_SpecOp("s${SeqNum}_metapathop","Reset",anchorvalue);
 }
   
-function MetaPathAppendSite(anchorvalue)
+function s${SeqNum}_MetaPathAppendSite(anchorvalue)
 {
-  if (editjob.metasite.value == "")
+  if (editjob.s${SeqNum}_metasite.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseSelectASiteFirst'))");
-    editjob.metasite.focus();
+    editjob.s${SeqNum}_metasite.focus();
   }
   else
-    SpecOp("metapathop","AppendSite",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_metapathop","AppendSite",anchorvalue);
 }
 
-function MetaPathAppendLibrary(anchorvalue)
+function s${SeqNum}_MetaPathAppendLibrary(anchorvalue)
 {
-  if (editjob.metalibrary.value == "")
+  if (editjob.s${SeqNum}_metalibrary.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseSelectALibraryFirst'))");
-    editjob.metalibrary.focus();
+    editjob.s${SeqNum}_metalibrary.focus();
   }
   else
-    SpecOp("metapathop","AppendLibrary",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_metapathop","AppendLibrary",anchorvalue);
 }
 
-function MetaPathAppendList(anchorvalue)
+function s${SeqNum}_MetaPathAppendList(anchorvalue)
 {
-  if (editjob.metalist.value == "")
+  if (editjob.s${SeqNum}_metalist.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseSelectAListFirst'))");
-    editjob.metalist.focus();
+    editjob.s${SeqNum}_metalist.focus();
   }
   else
-    SpecOp("metapathop","AppendList",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_metapathop","AppendList",anchorvalue);
 }
 
-function MetaPathAppendText(anchorvalue)
+function s${SeqNum}_MetaPathAppendText(anchorvalue)
 {
-  if (editjob.metamatch.value == "")
+  if (editjob.s${SeqNum}_metamatch.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.PleaseProvideMatchTextFirst'))");
-    editjob.metamatch.focus();
+    editjob.s${SeqNum}_metamatch.focus();
   }
   else
-    SpecOp("metapathop","AppendText",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_metapathop","AppendText",anchorvalue);
 }
 
-function MetaPathRemove(anchorvalue)
+function s${SeqNum}_MetaPathRemove(anchorvalue)
 {
-  SpecOp("metapathop","Remove",anchorvalue);
+  s${SeqNum}_SpecOp("s${SeqNum}_metapathop","Remove",anchorvalue);
 }
 
-function SpecAddAccessToken(anchorvalue)
+function s${SeqNum}_SpecAddAccessToken(anchorvalue)
 {
-  if (editjob.spectoken.value == "")
+  if (editjob.s${SeqNum}_spectoken.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.AccessTokenCannotBeNull'))");
-    editjob.spectoken.focus();
+    editjob.s${SeqNum}_spectoken.focus();
   }
   else
-    SpecOp("accessop","Add",anchorvalue);
+    s${SeqNum}_SpecOp("s${SeqNum}_accessop","Add",anchorvalue);
 }
 
-function SpecAddMapping(anchorvalue)
+function s${SeqNum}_SpecAddMapping(anchorvalue)
 {
-  if (editjob.specmatch.value == "")
+  if (editjob.s${SeqNum}_specmatch.value == "")
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.MatchStringCannotBeEmpty'))");
-    editjob.specmatch.focus();
+    editjob.s${SeqNum}_specmatch.focus();
     return;
   }
-  if (!isRegularExpression(editjob.specmatch.value))
+  if (!isRegularExpression(editjob.s${SeqNum}_specmatch.value))
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('SharePointRepository.MatchStringMustBeValidRegularExpression'))");
-    editjob.specmatch.focus();
+    editjob.s${SeqNum}_specmatch.focus();
     return;
   }
-  SpecOp("specmappingop","Add",anchorvalue);
+  s${SeqNum}_SpecOp("s${SeqNum}_specmappingop","Add",anchorvalue);
 }
 
-function SpecOp(n, opValue, anchorvalue)
+function s${SeqNum}_SpecOp(n, opValue, anchorvalue)
 {
   eval("editjob."+n+".value = \""+opValue+"\"");
   postFormSetAnchor(anchorvalue);

Modified: 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Metadata.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Metadata.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Metadata.html
 (original)
+++ 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Metadata.html
 Fri Sep  5 16:48:06 2014
@@ -15,10 +15,10 @@
  limitations under the License.
 -->
 
-#if($TabName == $ResourceBundle.getString('SharePointRepository.Metadata'))
+#if($TabName == $ResourceBundle.getString('SharePointRepository.Metadata') && 
${SeqNum} == ${SelectedNum})
 
-<input type="hidden" name="specmappingcount" value="$MAPLIST.size()"/>
-<input type="hidden" name="specmappingop" value=""/>
+<input type="hidden" name="s${SeqNum}_specmappingcount" 
value="$MAPLIST.size()"/>
+<input type="hidden" name="s${SeqNum}_specmappingop" value=""/>
 
 <table class="displaytable">
 <tr><td class="separator" colspan="4"><hr/></td></tr>
@@ -45,9 +45,9 @@
     #end
           <td class="formcolumncell">
             <nobr>
-              <a name="meta_$rulecounter"/>
-              <input type="hidden" name="metaop_$rulecounter" value=""/>
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.InsertNewRule'))"
 onClick='Javascript:SpecOp("metaop_$rulecounter","Insert 
Here","meta_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.InsertNewMetadataRuleBeforeRule'))$rulecounter"/>
+              <a name="s${SeqNum}_meta_$rulecounter"/>
+              <input type="hidden" name="s${SeqNum}_metaop_$rulecounter" 
value=""/>
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.InsertNewRule'))"
 onClick='Javascript:s${SeqNum}_SpecOp("s${SeqNum}_metaop_$rulecounter","Insert 
Here","s${SeqNum}_meta_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.InsertNewMetadataRuleBeforeRule'))$rulecounter"/>
             </nobr>
           </td>
           <td class="formcolumncell" colspan="4"></td>
@@ -62,30 +62,30 @@
     #end
           <td class="formcolumncell">
             <nobr>
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.Delete'))"
 
onClick='Javascript:SpecOp("metaop_$rulecounter","Delete","meta_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeleteMetadataRule'))$rulecounter"/>
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.Delete'))"
 
onClick='Javascript:s${SeqNum}_SpecOp("s${SeqNum}_metaop_$rulecounter","Delete","meta_$rulecounter")'
 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeleteMetadataRule'))$rulecounter"/>
             </nobr>
           </td>
           <td class="formcolumncell">
             <nobr>
-              <input type="hidden" name="metapath_$rulecounter" 
value="$Encoder.attributeEscape($metadatarule.get('THEPATH'))"/>
+              <input type="hidden" name="s${SeqNum}_metapath_$rulecounter" 
value="$Encoder.attributeEscape($metadatarule.get('THEPATH'))"/>
               $Encoder.bodyEscape($metadatarule.get('THEPATH'))
             </nobr>
           </td>
           <td class="formcolumncell">
             <nobr>
-              <input type="hidden" name="metaflav_$rulecounter" 
value="$metadatarule.get('THEACTION')"/>
+              <input type="hidden" name="s${SeqNum}_metaflav_$rulecounter" 
value="$metadatarule.get('THEACTION')"/>
               $metadatarule.get('THEACTION')
             </nobr>
           </td>
           <td class="formcolumncell">
             <nobr>
-              <input type="hidden" name="metaall_$rulecounter" 
value="$metadatarule.get('ALLFLAG')"/>
+              <input type="hidden" name="s${SeqNum}_metaall_$rulecounter" 
value="$metadatarule.get('ALLFLAG')"/>
               $metadatarule.get('ALLFLAG')
             </nobr>
           </td>
           <td class="formcolumncell">
     #foreach($field in $metadatarule.get('FIELDLIST'))
-              <input type="hidden" name="metafields_$rulecounter" 
value="$Encoder.attributeEscape($field)"/>
+              <input type="hidden" name="s${SeqNum}_metafields_$rulecounter" 
value="$Encoder.attributeEscape($field)"/>
     #end
             $Encoder.bodyEscape($metadatarule.get('FIELDS'))
           </td>
@@ -107,10 +107,10 @@
   
           <td class="formcolumncell">
             <nobr>
-              <a name="meta_$rulecounter"/>
-              <input type="hidden" name="metaop" value=""/>
-              <input type="hidden" name="metapathcount" value="$rulecounter"/>
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddNewRule'))"
 onClick='Javascript:MetaRuleAddPath("meta_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddRule'))"/>
+              <a name="s${SeqNum}_meta_$rulecounter"/>
+              <input type="hidden" name="s${SeqNum}_metaop" value=""/>
+              <input type="hidden" name="s${SeqNum}_metapathcount" 
value="$rulecounter"/>
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddNewRule'))"
 
onClick='Javascript:s${SeqNum}_MetaRuleAddPath("s${SeqNum}_meta_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddRule'))"/>
             </nobr>
           </td>
           <td class="formcolumncell" colspan="4"></td>
@@ -122,18 +122,18 @@
           </td>
           <td class="formcolumncell">
             <nobr>
-              <input type="hidden" name="metapathop" value=""/>
-              <input type="hidden" name="metapath" 
value="$Encoder.attributeEscape($METAPATHSOFAR)"/>
-              <input type="hidden" name="metapathstate" 
value="$METAPATHSTATE"/>
+              <input type="hidden" name="s${SeqNum}_metapathop" value=""/>
+              <input type="hidden" name="s${SeqNum}_metapath" 
value="$Encoder.attributeEscape($METAPATHSOFAR)"/>
+              <input type="hidden" name="s${SeqNum}_metapathstate" 
value="$METAPATHSTATE"/>
   #if($METAPATHLIBRARY)
-              <input type="hidden" name="metapathlibrary" 
value="$Encoder.attributeEscape($METAPATHLIBRARY)"/>
+              <input type="hidden" name="s${SeqNum}_metapathlibrary" 
value="$Encoder.attributeEscape($METAPATHLIBRARY)"/>
   #end
               $Encoder.bodyEscape($METAPATHSOFAR)
             </nobr>
           </td>
           <td class="formcolumncell">
             <nobr>
-              <select name="metaflavor" size="2">
+              <select name="s${SeqNum}_metaflavor" size="2">
                 <option value="include" 
selected="true">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.Include'))</option>
                 <option 
value="exclude">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.Exclude'))</option>
               </select>
@@ -141,13 +141,13 @@
           </td>
           <td class="formcolumncell">
             <nobr>
-              <input type="checkbox" name="metaall" 
value="true"/>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.IncludeAllMetadata'))
+              <input type="checkbox" name="s${SeqNum}_metaall" 
value="true"/>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.IncludeAllMetadata'))
             </nobr>
           </td>
           <td class="formcolumncell">
   #if($METAFIELDLIST && $METAFIELDLIST.size() > 0)
             <nobr>
-              <select name="metafields" multiple="true" size="5">
+              <select name="s${SeqNum}_metafields" multiple="true" size="5">
     #foreach($field in $METAFIELDLIST)
                 <option 
value="$Encoder.attributeEscape($field.getValue())"/>$Encoder.bodyEscape($field.getPrettyName())</option>
     #end
@@ -165,18 +165,18 @@
   #else
           <td class="formcolumncell">
             <nobr>
-              <a name="metapathwidget"/>
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.ResetPath'))"
 onClick='Javascript:MetaPathReset("metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.ResetMetadataRulePath'))"/>
+              <a name="s${SeqNum}_metapathwidget"/>
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.ResetPath'))"
 onClick='Javascript:s${SeqNum}_MetaPathReset("s${SeqNum}_metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.ResetMetadataRulePath'))"/>
     #if($METAPATHSOFAR.length() > 1 && ($METAPATHSTATE == 'site' || 
$METAPATHSTATE == 'library'))
-              <input type="button" value="-" 
onClick='Javascript:MetaPathRemove("metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.RemoveFromMetadataRulePath'))"/>
+              <input type="button" value="-" 
onClick='Javascript:s${SeqNum}_MetaPathRemove("s${SeqNum}_metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.RemoveFromMetadataRulePath'))"/>
     #end
             </nobr>
           </td>
           <td class="formcolumncell" colspan="4">
             <nobr>
     #if($METAPATHSTATE == 'site' && $METACHILDSITELIST && 
$METACHILDSITELIST.size() > 0)
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddSite'))"
 onClick='Javascript:MetaPathAppendSite("metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddSiteToMetadataRulePath'))"/>
-              <select name="metasite" size="5">
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddSite'))"
 
onClick='Javascript:s${SeqNum}_MetaPathAppendSite("s${SeqNum}_metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddSiteToMetadataRulePath'))"/>
+              <select name="s${SeqNum}_metasite" size="5">
                 <option value="" 
selected="true">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SelectSite'))</option>
       #foreach($child in $METACHILDSITELIST)
                 <option 
value="$Encoder.attributeEscape($child.getValue())">$Encoder.bodyEscape($child.getPrettyName())</option>
@@ -185,8 +185,8 @@
     #end
         
     #if($METAPATHSTATE == 'site' && $METACHILDLIBLIST && 
$METACHILDLIBLIST.size() > 0)
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddLibrary'))"
 onClick='Javascript:MetaPathAppendLibrary("metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddLibraryToMetadataRulePath'))"/>
-              <select name="metalibrary" size="5">
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddLibrary'))"
 
onClick='Javascript:s${SeqNum}_MetaPathAppendLibrary("s${SeqNum}_metapathwidget")'
 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddLibraryToMetadataRulePath'))"/>
+              <select name="s${SeqNum}_metalibrary" size="5">
                 <option value="" 
selected="true">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SelectLibrary'))</option>\
       #foreach($child in $METACHILDLIBLIST)
                 <option 
value="$Encoder.attributeEscape($child.getValue())">$Encoder.bodyEscape($child.getPrettyName())</option>
@@ -195,8 +195,8 @@
     #end
 
     #if($METAPATHSTATE == 'site' && $METACHILDLISTLIST && 
$METACHILDLISTLIST.size() > 0)
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddList'))"
 onClick='Javascript:MetaPathAppendList("metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddListToMetadataRulePath'))"/>
-              <select name="metalist" size="5">
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddList'))"
 
onClick='Javascript:s${SeqNum}_MetaPathAppendList("s${SeqNum}_metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddListToMetadataRulePath'))"/>
+              <select name="s${SeqNum}_metalist" size="5">
                 <option value="" 
selected="true">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SelectList'))</option>
       #foreach($child in $METACHILDLISTLIST)
                 <option 
value="$Encoder.attributeEscape($child.getValue())">$Encoder.bodyEscape($child.getPrettyName())</option>
@@ -205,8 +205,8 @@
     #end
 
     #if($METAPATHSTATE != 'list')
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddText'))"
 onClick='Javascript:MetaPathAppendText("metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddTextToMetadataRulePath'))"/>
-              <input type="text" name="metamatch" size="32" value=""/>
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddText'))"
 
onClick='Javascript:s${SeqNum}_MetaPathAppendText("s${SeqNum}_metapathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddTextToMetadataRulePath'))"/>
+              <input type="text" name="s${SeqNum}_metamatch" size="32" 
value=""/>
     #end
             </nobr>
           </td>
@@ -226,7 +226,7 @@
           <td 
class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.AttributeName'))</nobr></td>
           <td class="value" colspan="3">
             <nobr>
-              <input type="text" name="specpathnameattribute" size="20" 
value="$Encoder.attributeEscape($PATHNAMEATTRIBUTE)"/>
+              <input type="text" name="s${SeqNum}_specpathnameattribute" 
size="20" value="$Encoder.attributeEscape($PATHNAMEATTRIBUTE)"/>
             </nobr>
           </td>
         </tr>
@@ -237,21 +237,21 @@
   #foreach($mapitem in $MAPLIST)
         <tr>
           <td class="description">
-            <input type="hidden" name="specmappingop_$mapcounter" value=""/>
-            <a name="mapping_$mapcounter">
-              <input type="button" 
onClick='Javascript:SpecOp("specmappingop_$mapcounter","Delete","mapping_$mapcounter")'
 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeleteMapping'))$mapcounter"
 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeletePathMapping'))"/>
+            <input type="hidden" name="s${SeqNum}_specmappingop_$mapcounter" 
value=""/>
+            <a name="s${SeqNum}_mapping_$mapcounter">
+              <input type="button" 
onClick='Javascript:s${SeqNum}_SpecOp("s${SeqNum}_specmappingop_$mapcounter","Delete","s${SeqNum}_mapping_$mapcounter")'
 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeleteMapping'))$mapcounter"
 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeletePathMapping'))"/>
             </a>
           </td>
           <td class="value">
             <nobr>
-              <input type="hidden" name="specmatch_$mapcounter" 
value="$Encoder.attributeEscape($mapitem.get('MATCH'))"/>
+              <input type="hidden" name="s${SeqNum}_specmatch_$mapcounter" 
value="$Encoder.attributeEscape($mapitem.get('MATCH'))"/>
               $Encoder.bodyEscape($mapitem.get('MATCH'))
             </nobr>
           </td>
           <td class="value">==></td>
           <td class="value">
             <nobr>
-              <input type="hidden" name="specreplace_$mapcounter" 
value="$Encoder.attributeEscape($mapitem.get('REPLACE'))"/>
+              <input type="hidden" name="s${SeqNum}_specreplace_$mapcounter" 
value="$Encoder.attributeEscape($mapitem.get('REPLACE'))"/>
               $Encoder.bodyEscape($mapitem.get('REPLACE'))
             </nobr>
           </td>
@@ -269,13 +269,13 @@
   
         <tr>
           <td class="description">
-            <a name="mapping_$mapcounter">
-              <input type="button" 
onClick='Javascript:SpecAddMapping("mapping_$mapcounterplusone")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddToMappings'))"
 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddPathMapping'))"/>
+            <a name="s${SeqNum}_mapping_$mapcounter">
+              <input type="button" 
onClick='Javascript:s${SeqNum}_SpecAddMapping("s${SeqNum}_mapping_$mapcounterplusone")'
 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddToMappings'))"
 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddPathMapping'))"/>
             </a>
           </td>
-          <td 
class="value"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.MatchRegexp'))&nbsp;<input
 type="text" name="specmatch" size="32" value=""/></nobr></td>
+          <td 
class="value"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.MatchRegexp'))&nbsp;<input
 type="text" name="s${SeqNum}_specmatch" size="32" value=""/></nobr></td>
           <td class="value">==></td>
-          <td 
class="value"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.ReplaceString'))&nbsp;<input
 type="text" name="specreplace" size="32" value=""/></nobr></td>
+          <td 
class="value"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.ReplaceString'))&nbsp;<input
 type="text" name="s${SeqNum}_specreplace" size="32" value=""/></nobr></td>
         </tr>
       </table>
     </td>
@@ -287,26 +287,26 @@
   #set($rulecounter = 0)
   #foreach($metadatarule in $METADATARULES)
 
-<input type="hidden" name="metapath_$rulecounter" 
value="$Encoder.attributeEscape($metadatarule.get('THEPATH'))"/>
-<input type="hidden" name="metaflav_$rulecounter" 
value="$metadatarule.get('THEACTION')"/>
-<input type="hidden" name="metaall_$rulecounter" 
value="$metadatarule.get('ALLFLAG')"/>
+<input type="hidden" name="s${SeqNum}_metapath_$rulecounter" 
value="$Encoder.attributeEscape($metadatarule.get('THEPATH'))"/>
+<input type="hidden" name="s${SeqNum}_metaflav_$rulecounter" 
value="$metadatarule.get('THEACTION')"/>
+<input type="hidden" name="s${SeqNum}_metaall_$rulecounter" 
value="$metadatarule.get('ALLFLAG')"/>
     #foreach($field in $metadatarule.get('FIELDLIST'))
-<input type="hidden" name="metafields_$rulecounter" 
value="$Encoder.attributeEscape($field)"/>
+<input type="hidden" name="s${SeqNum}_metafields_$rulecounter" 
value="$Encoder.attributeEscape($field)"/>
     #end
      
     #set($rulecounter = $rulecounter + 1)
   #end
   
-<input type="hidden" name="metapathcount" value="$rulecounter"/>
-<input type="hidden" name="specpathnameattribute" 
value="$Encoder.attributeEscape($PATHNAMEATTRIBUTE)"/>
+<input type="hidden" name="s${SeqNum}_metapathcount" value="$rulecounter"/>
+<input type="hidden" name="s${SeqNum}_specpathnameattribute" 
value="$Encoder.attributeEscape($PATHNAMEATTRIBUTE)"/>
   
   #set($mapcounter = 0)
   #foreach($mapping in $MAPLIST)
-<input type="hidden" name="specmatch_$mapcounter" 
value="$Encoder.attributeEscape($mapping.get('MATCH'))"/>
-<input type="hidden" name="specreplace_$mapcounter" 
value="$Encoder.attributeEscape($mapping.get('REPLACE'))"/>
+<input type="hidden" name="s${SeqNum}_specmatch_$mapcounter" 
value="$Encoder.attributeEscape($mapping.get('MATCH'))"/>
+<input type="hidden" name="s${SeqNum}_specreplace_$mapcounter" 
value="$Encoder.attributeEscape($mapping.get('REPLACE'))"/>
     #set($mapcounter = $mapcounter + 1)
   #end
 
-<input type="hidden" name="specmappingcount" value="$mapcounter"/>
+<input type="hidden" name="s${SeqNum}_specmappingcount" value="$mapcounter"/>
 
 #end

Modified: 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Paths.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Paths.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Paths.html
 (original)
+++ 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Paths.html
 Fri Sep  5 16:48:06 2014
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-#if($TabName == $ResourceBundle.getString('SharePointRepository.Paths'))
+#if($TabName == $ResourceBundle.getString('SharePointRepository.Paths') && 
${SeqNum} == ${SelectedNum})
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
@@ -41,9 +41,9 @@
     #end
           <td class="formcolumncell">
             <nobr>
-              <a name="path_$rulecounter"/>
-              <input type="hidden" name="specop_$rulecounter" value=""/>
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.InsertNewRule'))"
 onClick='Javascript:SpecOp("specop_$rulecounter","Insert 
Here","path_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.InsertNewRuleBeforeRule'))$rulecounter"/>
+              <a name="s${SeqNum}_path_$rulecounter"/>
+              <input type="hidden" name="s${SeqNum}_specop_$rulecounter" 
value=""/>
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.InsertNewRule'))"
 onClick='Javascript:s${SeqNum}_SpecOp("s${SeqNum}_specop_$rulecounter","Insert 
Here","s${SeqNum}_path_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.InsertNewRuleBeforeRule'))$rulecounter"/>
             </nobr>
           </td>
           <td class="formcolumncell" colspan="3"></td>
@@ -58,24 +58,24 @@
     #end
           <td class="formcolumncell">
             <nobr>
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.Delete'))"
 
onClick='Javascript:SpecOp("specop_$rulecounter","Delete","path_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeleteRule'))$rulecounter"/>
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.Delete'))"
 
onClick='Javascript:s${SeqNum}_SpecOp("s${SeqNum}_specop_$rulecounter","Delete","s${SeqNum}_path_$rulecounter")'
 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeleteRule'))$rulecounter"/>
             </nobr>
           </td>
           <td class="formcolumncell">
             <nobr>
-              <input type="hidden" name="specpath_$rulecounter" 
value="$Encoder.attributeEscape($rule.get('THEPATH'))"/>
+              <input type="hidden" name="s${SeqNum}_specpath_$rulecounter" 
value="$Encoder.attributeEscape($rule.get('THEPATH'))"/>
               $Encoder.bodyEscape($rule.get('THEPATH'))
             </nobr>
           </td>
           <td class="formcolumncell">
             <nobr>
-              <input type="hidden" name="spectype_$rulecounter" 
value="$rule.get('THETYPE')"/>
+              <input type="hidden" name="s${SeqNum}_spectype_$rulecounter" 
value="$rule.get('THETYPE')"/>
               $rule.get('THETYPE')
             </nobr>
           </td>
           <td class="formcolumncell">
             <nobr>
-              <input type="hidden" name="specflav_$rulecounter" 
value="$rule.get('THEACTION')"/>
+              <input type="hidden" name="s${SeqNum}_specflav_$rulecounter" 
value="$rule.get('THEACTION')"/>
               $rule.get('THEACTION')
             </nobr>
           </td>
@@ -96,10 +96,10 @@
   #end
           <td class="formcolumncell">
             <nobr>
-              <a name="path_$rulecounter"/>
-              <input type="hidden" name="specop" value=""/>
-              <input type="hidden" name="specpathcount" value="$rulecounter"/>
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddNewRule'))"
 onClick='Javascript:SpecRuleAddPath("path_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddRule'))"/>
+              <a name="s${SeqNum}_path_$rulecounter"/>
+              <input type="hidden" name="s${SeqNum}_specop" value=""/>
+              <input type="hidden" name="s${SeqNum}_specpathcount" 
value="$rulecounter"/>
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddNewRule'))"
 
onClick='Javascript:s${SeqNum}_SpecRuleAddPath("s${SeqNum}_path_$rulecounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddRule'))"/>
             </nobr>
           </td>
           <td class="formcolumncell" colspan="3"></td>
@@ -113,11 +113,11 @@
           </td>
           <td class="formcolumncell">
             <nobr>
-              <input type="hidden" name="specpathop" value=""/>
-              <input type="hidden" name="specpath" 
value="$Encoder.attributeEscape($PATHSOFAR)"/>
-              <input type="hidden" name="specpathstate" value="$PATHSTATE"/>
+              <input type="hidden" name="s${SeqNum}_specpathop" value=""/>
+              <input type="hidden" name="s${SeqNum}_specpath" 
value="$Encoder.attributeEscape($PATHSOFAR)"/>
+              <input type="hidden" name="s${SeqNum}_specpathstate" 
value="$PATHSTATE"/>
   #if($PATHLIBRARY)
-              <input type="hidden" name="specpathlibrary" 
value="$Encoder.attributeEscape($PATHLIBRARY)"/>
+              <input type="hidden" name="s${SeqNum}_specpathlibrary" 
value="$Encoder.attributeEscape($PATHLIBRARY)"/>
   #end
               $Encoder.bodyEscape($PATHSOFAR)
             </nobr>
@@ -128,19 +128,19 @@
   #if($PATHSTATE == 'unknown')
   
     #if(!$PATHLIBRARY)
-              <select name="spectype" size="4">
+              <select name="s${SeqNum}_spectype" size="4">
                 <option value="file" 
selected="true">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.File'))</option>
                 <option 
value="library">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.Library'))</option>
                 <option 
value="list">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.List'))</option>
                 <option 
value="site">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.Site'))</option>
               </select>
     #else
-              <input type="hidden" name="spectype" value="file"/>
+              <input type="hidden" name="s${SeqNum}_spectype" value="file"/>
               file
     #end
 
   #else
-              <input type="hidden" name="spectype" 
value="$Encoder.attributeEscape($PATHSTATE)"/>
+              <input type="hidden" name="s${SeqNum}_spectype" 
value="$Encoder.attributeEscape($PATHSTATE)"/>
               $PATHSTATE
   #end
 
@@ -148,7 +148,7 @@
           </td>
           <td class="formcolumncell">
             <nobr>
-              <select name="specflavor" size="2">
+              <select name="s${SeqNum}_specflavor" size="2">
                 <option value="include" 
selected="true">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.Include'))</option>
                 <option 
value="exclude">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.Exclude'))</option>
               </select>
@@ -164,18 +164,18 @@
   
           <td class="formcolumncell">
             <nobr>
-              <a name="pathwidget"/>
-              <input type="button" value="Reset Path" 
onClick='Javascript:SpecPathReset("pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.ResetRulePath'))"/>
+              <a name="s${SeqNum}_pathwidget"/>
+              <input type="button" value="Reset Path" 
onClick='Javascript:s${SeqNum}_SpecPathReset("s${SeqNum}_pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.ResetRulePath'))"/>
     #if($PATHSOFAR.length() > 1 && ($PATHSTATE == 'site' || $PATHSTATE == 
'library' || $PATHSTATE == 'list'))
-              <input type="button" value="-" 
onClick='Javascript:SpecPathRemove("pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.RemoveFromRulePath'))"/>
+              <input type="button" value="-" 
onClick='Javascript:s${SeqNum}_SpecPathRemove("s${SeqNum}_pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.RemoveFromRulePath'))"/>
     #end
             </nobr>
           </td>
           <td class="formcolumncell" colspan="3">
             <nobr>
     #if($PATHSTATE == 'site' && $CHILDSITELIST && $CHILDSITELIST.size() != 0)
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddSite'))"
 onClick='Javascript:SpecPathAppendSite("pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddSiteToRulePath'))"/>
-              <select name="specsite" size="5">
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddSite'))"
 onClick='Javascript:s${SeqNum}_SpecPathAppendSite("s${SeqNum}_pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddSiteToRulePath'))"/>
+              <select name="s${SeqNum}_specsite" size="5">
                 <option value="" selected="true">-- 
$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SelectSite'))
 --</option>
       #foreach($sitechild in $CHILDSITELIST)
                 <option 
value="$Encoder.attributeEscape($sitechild.getValue())">$Encoder.bodyEscape($sitechild.getPrettyName())</option>
@@ -184,8 +184,8 @@
     #end
     
     #if($PATHSTATE == 'site' && $CHILDLIBLIST && $CHILDLIBLIST.size() != 0)
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddLibrary'))"
 onClick='Javascript:SpecPathAppendLibrary("pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddLibraryToRulePath'))"/>
-              <select name="speclibrary" size="5">
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddLibrary'))"
 onClick='Javascript:s${SeqNum}_SpecPathAppendLibrary("s${SeqNum}_pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddLibraryToRulePath'))"/>
+              <select name="s${SeqNum}_speclibrary" size="5">
                 <option value="" selected="true">-- 
$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SelectLibrary'))
 --</option>
       #foreach($libchild in $CHILDLIBLIST)
                 <option 
value="$Encoder.attributeEscape($libchild.getValue())">$Encoder.bodyEscape($libchild.getPrettyName())</option>
@@ -194,8 +194,8 @@
     #end
 
     #if($PATHSTATE == 'site' && $CHILDLISTLIST && $CHILDLISTLIST.size() != 0)
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddList'))"
 onClick='Javascript:SpecPathAppendList("pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddListToRulePath'))"/>
-              <select name="speclist" size="5">
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddList'))"
 onClick='Javascript:s${SeqNum}_SpecPathAppendList("s${SeqNum}_pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddListToRulePath'))"/>
+              <select name="s${SeqNum}_speclist" size="5">
                 <option value="" selected="true">-- 
$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SelectList'))
 --</option>
       #foreach($listchild in $CHILDLISTLIST)
                 <option 
value="$Encoder.attributeEscape($listchild.getValue())">$Encoder.bodyEscape($listchild.getPrettyName())</option>
@@ -204,8 +204,8 @@
     #end
         
     #if($PATHSTATE != 'list')
-              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddText'))"
 onClick='Javascript:SpecPathAppendText("pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddTextToRulePath'))"/>
-              <input type="text" name="specmatch" size="32" value=""/>
+              <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddText'))"
 onClick='Javascript:s${SeqNum}_SpecPathAppendText("s${SeqNum}_pathwidget")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.AddTextToRulePath'))"/>
+              <input type="text" name="s${SeqNum}_specmatch" size="32" 
value=""/>
     #end
         
             </nobr>
@@ -223,13 +223,13 @@
   #set($rulecounter = 0)
   #foreach($rule in $RULES)
 
-<input type="hidden" name="specpath_$rulecounter" 
value="$Encoder.attributeEscape($rule.get('THEPATH'))"/>
-<input type="hidden" name="spectype_$rulecounter" 
value="$rule.get('THETYPE')"/>
-<input type="hidden" name="specflav_$rulecounter" 
value="$rule.get('THEACTION')"/>
+<input type="hidden" name="s${SeqNum}_specpath_$rulecounter" 
value="$Encoder.attributeEscape($rule.get('THEPATH'))"/>
+<input type="hidden" name="s${SeqNum}_spectype_$rulecounter" 
value="$rule.get('THETYPE')"/>
+<input type="hidden" name="s${SeqNum}_specflav_$rulecounter" 
value="$rule.get('THEACTION')"/>
       
     #set($rulecounter = $rulecounter + 1)
   #end
 
-<input type="hidden" name="specpathcount" value="$rulecounter"/>
+<input type="hidden" name="s${SeqNum}_specpathcount" value="$rulecounter"/>
 
 #end

Modified: 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Security.html
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Security.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Security.html
 (original)
+++ 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editSpecification_Security.html
 Fri Sep  5 16:48:06 2014
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-#if($TabName == $ResourceBundle.getString('SharePointRepository.Security'))
+#if($TabName == $ResourceBundle.getString('SharePointRepository.Security') && 
${SeqNum} == ${SelectedNum})
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
@@ -24,15 +24,15 @@
     <td class="value" colspan="1">
       <nobr>
   #if($SECURITY == 'on')
-        <input type="radio" name="specsecurity" value="on" checked="true"/>
+        <input type="radio" name="s${SeqNum}_specsecurity" value="on" 
checked="true"/>
   #else
-        <input type="radio" name="specsecurity" value="on"/>
+        <input type="radio" name="s${SeqNum}_specsecurity" value="on"/>
   #end
           
$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.Enabled'))&nbsp;
   #if($SECURITY == 'off')
-        <input type="radio" name="specsecurity" value="off" checked="true"/>
+        <input type="radio" name="s${SeqNum}_specsecurity" value="off" 
checked="true"/>
   #else
-        <input type="radio" name="specsecurity" value="off"/>
+        <input type="radio" name="s${SeqNum}_specsecurity" value="off"/>
   #end
           
$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.Disabled'))
       </nobr>
@@ -46,10 +46,10 @@
 
   <tr>
     <td class="description">
-      <input type="hidden" name="accessop_$atcounter" value=""/>
-      <input type="hidden" name="spectoken_$atcounter" 
value="$Encoder.attributeEscape($accesstoken)"/>
-      <a name="token_$atcounter">
-        <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.Delete'))"
 onClick='Javascript:SpecOp("accessop_$atcounter","Delete","token_$atcounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeleteToken'))$atcounter"/>
+      <input type="hidden" name="s${SeqNum}_accessop_$atcounter" value=""/>
+      <input type="hidden" name="s${SeqNum}_spectoken_$atcounter" 
value="$Encoder.attributeEscape($accesstoken)"/>
+      <a name="s${SeqNum}_token_$atcounter">
+        <input type="button" 
value="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.Delete'))"
 
onClick='Javascript:s${SeqNum}_SpecOp("s${SeqNum}_accessop_$atcounter","Delete","s${SeqNum}_token_$atcounter")'
 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.DeleteToken'))$atcounter"/>
       </a>
     </td>
     <td class="value">
@@ -70,30 +70,30 @@
   <tr><td class="lightseparator" colspan="2"><hr/></td></tr>
   <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('SharePointRepository.Add'))"
 onClick='Javascript:SpecAddAccessToken("token_$atcounter")' 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.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('SharePointRepository.Add'))"
 
onClick='Javascript:s${SeqNum}_SpecAddAccessToken("s${SeqNum}_token_$atcounter")'
 
alt="$Encoder.attributeEscape($ResourceBundle.getString('SharePointRepository.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>
 
 #else
 
-<input type="hidden" name="specsecurity" value="$SECURITY"/>
+<input type="hidden" name="s${SeqNum}_specsecurity" value="$SECURITY"/>
 
   #set($atcounter = 0)
   #foreach($accesstoken in $ACCESSTOKENS)
   
-<input type="hidden" name="spectoken_$atcounter" 
value="$Encoder.attributeEscape($accesstoken)"/>
+<input type="hidden" name="s${SeqNum}_spectoken_$atcounter" 
value="$Encoder.attributeEscape($accesstoken)"/>
 
     #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/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editSpecification.js
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editSpecification.js?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editSpecification.js
 (original)
+++ 
manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editSpecification.js
 Fri Sep  5 16:48:06 2014
@@ -17,11 +17,6 @@
 
 <script type="text/javascript">
 <!--
-function s${SEQNUM}_checkSpecification()
-{
-  return true;
-}
-
 function s${SEQNUM}_addFieldMapping()
 {
   if (editjob.s${SEQNUM}_fieldmapping_source.value == "")


Reply via email to