Update of /var/cvs/contributions/didactor2/src/core/templates/cockpit
In directory james.mmbase.org:/tmp/cvs-serv6051

Modified Files:
        providerbar.jsp 
Log Message:
moved some java code to a function on the provider node


See also: 
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/templates/cockpit


Index: providerbar.jsp
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/core/templates/cockpit/providerbar.jsp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- providerbar.jsp     17 Jan 2008 10:53:32 -0000      1.30
+++ providerbar.jsp     18 Jan 2008 12:23:53 -0000      1.31
@@ -30,40 +30,20 @@
 
       keepalive();
     </script>
-      <jsp:scriptlet>Map tm = new HashMap();</jsp:scriptlet>
       <mm:hasrank minvalue="didactor user">
         <mm:node referid="provider">
-          <mm:relatednodes role="settingrel" type="components">
-            <mm:field name="name" jspvar="cname" write="false" 
vartype="String">
-              <jsp:scriptlet>
-                Component c = Component.getComponent(cname);
-                if (c == null) System.err.println("No component '" + cname + 
"'");
-                if (c != null &amp;&amp; 
"provider".equals(c.getTemplateBar())) {
-                int a = c.getBarPosition() * 100;
-                while (tm.containsKey(new Integer(a))) {
-                a++; // make sure we have unique positions
-                }
-                tm.put(new Integer(a), c);
-                }
-              </jsp:scriptlet>
-            </mm:field>
-          </mm:relatednodes>
-        </mm:node>
-
-        <jsp:scriptlet>
-          Iterator i = tm.values().iterator();
-          while (i.hasNext()) {
-          Component c = (Component)i.next();
-        </jsp:scriptlet>
-        <mm:import id="componentname" 
reset="true"><jsp:expression>c.getName()</jsp:expression></mm:import>
-        <mm:treeinclude page="/$componentname/cockpit/menuitem.jsp" 
objectlist="$includePath" referids="$referids">
-          <mm:param 
name="name"><jsp:expression>c.getName()</jsp:expression></mm:param>
-          <mm:param 
name="number"><jsp:expression>c.getNumber()</jsp:expression></mm:param>
+          <mm:functioncontainer>
+            <mm:param name="bar">provider</mm:param>
+            <mm:listfunction name="components" id="c">
+              <mm:treeinclude page="/${c.name}/cockpit/menuitem.jsp" 
objectlist="$includePath" referids="$referids">
+                <mm:param name="name">${c.name}</mm:param>
+                <mm:param name="number">${c.number}</mm:param>
           <mm:param name="type">div</mm:param>
           <mm:param name="scope">provider</mm:param>
         </mm:treeinclude>
-
-        <jsp:scriptlet>}</jsp:scriptlet>
+            </mm:listfunction>
+          </mm:functioncontainer>
+        </mm:node>
 
         <!-- If the user has the rights, then always show the management link. 
That allows us to enable/disable components after install on an empty database 
-->
         <mm:treeinclude page="/education/cockpit/menuitem.jsp"
@@ -73,6 +53,7 @@
           <mm:param name="scope">provider</mm:param>
         </mm:treeinclude>
       </mm:hasrank>
+
       <mm:hasrank value="anonymous">
         <div class="provideranonymous">
           <mm:node referid="provider">
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to