Author: michiel
Date: 2010-03-16 18:59:41 +0100 (Tue, 16 Mar 2010)
New Revision: 41441
Added:
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-instant.jspx
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate.jspx
Log:
examples/tests for mm-sr:relate
Added:
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-instant.jspx
===================================================================
---
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-instant.jspx
(rev 0)
+++
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-instant.jspx
2010-03-16 17:59:41 UTC (rev 41441)
@@ -0,0 +1,43 @@
+<?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>Instant relations</h2>
+ <p>If you do not use a submit attribute, the relations are made instantly,
so you do not need a submit button at all.</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>
+ <form>
+ <mm-sr:relate
+ current="${current}"
+ repository="${repository}"
+ maxpages="10"
+ pagesize="5"
+ unrelate="true"
+ create="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>
+ </form>
+ </mm:node>
+
+ <mm:escape escape="links">$URL:
https://scm.mmbase.org/mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-instant.jspx
$</mm:escape>
+
+</mm-sre:html>
Property changes on:
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-instant.jspx
___________________________________________________________________
Name: svn:keywords
+ URLS
Added:
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
===================================================================
---
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
(rev 0)
+++
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
2010-03-16 17:59:41 UTC (rev 41441)
@@ -0,0 +1,43 @@
+<?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>
+ <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:node>
+
+ <mm:escape escape="links">$URL:
https://scm.mmbase.org/mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
$</mm:escape>
+
+</mm-sre:html>
Property changes on:
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate-select.jspx
___________________________________________________________________
Name: svn:keywords
+ URLS
Added:
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate.jspx
===================================================================
---
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate.jspx
(rev 0)
+++
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate.jspx
2010-03-16 17:59:41 UTC (rev 41441)
@@ -0,0 +1,46 @@
+<?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</h2>
+ <p>The basic idea of mm-sr:relate is that 2 lists of nodes are presented.
One list is the 'current' list (e.g. all to a certain other
+ related nodes of a certain type) and the other is the 'repository' (e.g. all
nodes of a certain type). You edit the current list by moving
+ items from and to the repository. </p>
+ <p>Make changes to the 'current' list and press the button to submit the
changes.</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>
+ <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:node>
+
+ <mm:escape escape="links">$URL:
https://scm.mmbase.org/mmbase/branches/MMBase-1_9/applications/searchrelate/example-webapp/src/main/webapp/relate.jspx
$</mm:escape>
+
+</mm-sre:html>
Property changes on:
mmbase/trunk/applications/searchrelate/example-webapp/src/main/webapp/relate.jspx
___________________________________________________________________
Name: svn:keywords
+ URLS
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs