Author: michiel
Date: 2010-03-17 17:20:41 +0100 (Wed, 17 Mar 2010)
New Revision: 41479

Added:
   
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select-instant.jspx
Modified:
   
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/index.jspx
   
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
   
mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/resources/META-INF/tags/mm/searchrelate/relate.tagx
Log:
defined the 'select' attribute (not yet implemented)

Modified: 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/index.jspx
===================================================================
--- 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/index.jspx
      2010-03-17 16:13:45 UTC (rev 41478)
+++ 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/index.jspx
      2010-03-17 16:20:41 UTC (rev 41479)
@@ -252,6 +252,11 @@
               <a href="${_}">Basic mm-sr:relate useage with preselect</a>
             </mm:link>
           </li>
+          <li>
+            <mm:link page="relate-select-instant.jspx" referids="${referids}">
+              <a href="${_}">Basic mm-sr:relate useage with preselect and 
withoug a submit button</a>
+            </mm:link>
+          </li>
 
 
           <li>Make more test-cases for this tag</li>

Added: 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select-instant.jspx
===================================================================
--- 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select-instant.jspx
                              (rev 0)
+++ 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select-instant.jspx
      2010-03-17 16:20:41 UTC (rev 41479)
@@ -0,0 +1,41 @@
+<?xml version="1.0" ?>
+<mm-sre:html
+    styleClass="search"
+    xmlns:jsp="http://java.sun.com/JSP/Page";
+    xmlns:c="http://java.sun.com/jsp/jstl/core";
+    xmlns:mm-sre="urn:jsptagdir:/WEB-INF/tags/mm/searchrelateexample"
+    xmlns:mm-srt="urn:jsptagdir:/WEB-INF/tags/mm/searchrelate"
+    xmlns:mm-sr="http://www.mmbase.org/tags/mm/searchrelate";
+    xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";>
+
+  <h2>mm-sr:relate with selection in the repository</h2>
+  <p>Make selections in the 'repository', then press the button to immediately 
submit those to 'current'.</p>
+
+
+  <mm:node number="default.mags">
+    <mm:relatednodescontainer type="news" id="current"  role="posrel">
+      <mm:sortorder field="number" direction="down" />
+      <mm:relatednodes id="related" />
+    </mm:relatednodescontainer>
+
+
+    <mm:listnodescontainer type="news" id="repository">
+      <mm:sortorder field="number" direction="down" />
+      <mm:constraint field="number" operator="IN" referid="related" 
inverse="true" />
+    </mm:listnodescontainer>
+    <mm-sr:relate
+        current="${current}" repository="${repository}"
+        maxpages="10"
+        pagesize="5"
+        unrelate="true"
+        create="true"
+        select="true"
+        extracreate="">
+      <jsp:attribute name="currentTitle"><b>News</b></jsp:attribute>
+      <jsp:attribute name="repositoryTitle"><b>Add other 
news</b></jsp:attribute>
+    </mm-sr:relate>
+  </mm:node>
+
+  <mm:escape escape="links">$URL$</mm:escape>
+
+</mm-sre:html>


Property changes on: 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select-instant.jspx
___________________________________________________________________
Name: svn:keywords
   + URL

Modified: 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
===================================================================
--- 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
      2010-03-17 16:13:45 UTC (rev 41478)
+++ 
mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
      2010-03-17 16:20:41 UTC (rev 41479)
@@ -14,6 +14,7 @@
     and vise versa.
   </p>
 
+
   <mm:node number="default.mags">
     <mm:relatednodescontainer type="news" id="current"  role="posrel">
       <mm:sortorder field="number" direction="down" />
@@ -25,20 +26,19 @@
       <mm:sortorder field="number" direction="down" />
       <mm:constraint field="number" operator="IN" referid="related" 
inverse="true" />
     </mm:listnodescontainer>
-    <form>
-      <mm-sr:relate
-          current="${current}" repository="${repository}"
-          maxpages="10"
-          pagesize="5"
-          unrelate="true"
-          create="true"
-          submit="#save"
-          extracreate="">
-        <jsp:attribute name="currentTitle"><b>News</b></jsp:attribute>
-        <jsp:attribute name="repositoryTitle"><b>Add other 
news</b></jsp:attribute>
-      </mm-sr:relate>
-      <input id="save" type="submit" value="Save" />
-    </form>
+    <mm-sr:relate
+        current="${current}" repository="${repository}"
+        maxpages="10"
+        pagesize="5"
+        unrelate="true"
+        create="true"
+        select="true"
+        submit="#save"
+        extracreate="">
+      <jsp:attribute name="currentTitle"><b>News</b></jsp:attribute>
+      <jsp:attribute name="repositoryTitle"><b>Add other 
news</b></jsp:attribute>
+    </mm-sr:relate>
+    <input type="submit" value="Save" id="save" />
   </mm:node>
 
   <mm:escape escape="links">$URL$</mm:escape>

Modified: 
mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/resources/META-INF/tags/mm/searchrelate/relate.tagx
===================================================================
--- 
mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/resources/META-INF/tags/mm/searchrelate/relate.tagx
   2010-03-17 16:13:45 UTC (rev 41478)
+++ 
mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/resources/META-INF/tags/mm/searchrelate/relate.tagx
   2010-03-17 16:20:41 UTC (rev 41479)
@@ -23,11 +23,17 @@
                            description="An mmbase Query describing which list 
is considered to represent already 'related' nodes" />
 
   <jsp:directive.attribute name="submit"            type="java.lang.String"
-                           description="Id of an element (typically a button) 
to submit and commit changes. Default it is, when no value is given it means 
that relate/unrelate happen immediately. The 'commit' action will be binded to 
the 'onclick' of the element." />
+                           description="Id of an element (typically a button) 
to submit and commit changes. Default it is, when no value is given it means 
that relate/unrelate happen immediately.
+                                        The 'commit' action will be binded to 
the 'onclick' of the element." />
 
+  <jsp:directive.attribute name="select"            type="java.lang.Boolean"
+                           description="If this is true (it defaults to 
false), then an extra button 'change' is added 'between' the current and 
repository lists.
+                                        Clicking on an item in one of the 
lists only selects it. Clicking on this change button then moves the selected 
items between the two lists.
+                                        " />
+
   <jsp:directive.attribute name="unrelate"          type="java.lang.Boolean"
                            description="Whether, or not, the tools should also 
allow deletion of relations" />
-  
+
   <jsp:directive.attribute name="relations"         type="java.lang.Boolean"
                            description="Whether, or not, the tools should show 
the relation values and display a small form to edit them" />
 

_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to