Author: michiel Date: 2009-12-03 14:55:15 +0100 (Thu, 03 Dec 2009) New Revision: 40105
Modified: mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/form/createrelation.tag mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/list/searchrow.tag mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/related/add.tag mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/related/createrelation.tag Log: support for constraints on relation nodes themselves Modified: mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/form/createrelation.tag =================================================================== --- mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/form/createrelation.tag 2009-12-03 13:47:59 UTC (rev 40104) +++ mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/form/createrelation.tag 2009-12-03 13:55:15 UTC (rev 40105) @@ -21,9 +21,9 @@ <%@ attribute name="referDestination" description="points to an id of a node in the current request"%> <%@ attribute name="destination" description="a node number or alias"%> <%@ attribute name="role" description="the relation role" required="true" %> +<%@ attribute name="relationValues" %> - <c:if test="${empty relationid}"><c:set var="relationid" scope="request" value="200"/></c:if> <c:set var="relationid" scope="request" value="${relationid+1}"/> @@ -57,7 +57,11 @@ <c:if test="${not empty role}"> <input type="hidden" name="actions[createRelation][${relationid}].role" value="${role}" /> </c:if> + <c:if test="${not empty constraints}"> + <input type="hidden" name="actions[createRelation][${relationid}].relationValues" value="${relationValues}" /> + </c:if> + <%-- do the body--%> <jsp:doBody/> @@ -65,4 +69,4 @@ <c:set var="action" value="${_action}" scope="request"/> <c:set var="modifier" value="${_modifier}" scope="request"/> <c:set var="nodetype" value="${_nodetype}" scope="request"/> -</c:if> \ No newline at end of file +</c:if> Modified: mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/list/searchrow.tag =================================================================== --- mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/list/searchrow.tag 2009-12-03 13:47:59 UTC (rev 40104) +++ mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/list/searchrow.tag 2009-12-03 13:55:15 UTC (rev 40105) @@ -9,6 +9,7 @@ <%@ attribute name="confirmdelete" type="java.lang.Boolean" description="wether you must confirm deleting nodes. default is true"%> <%@ attribute name="harddelete" type="java.lang.Boolean" description="wether you can delete nodes in the list (when you are authorized). defautls to false."%> <%@ attribute name="fields" required="true" description="the fields to show"%> +<%@ attribute name="constraints" description="Constraints on the the relation objects"%> <%-- <%@ attribute name="parenttype" description="when this is not empty, the $nodenr (attribute on list:wizard or list:searchlist) is taken as parent for nodes in the list, if it is set, the first node of given type that is related to a node in the list is taken as parent, so it translates into :'has any connections to..'. Don't quite see the use of it..." %> --%> @@ -159,7 +160,7 @@ <c:remove var="link"/> <mm:list path="${_path}" searchdir="${searchdir}" - constraints="${parentnodetype}.number=${parentnodenr} and ${searchtype}.number=${nodenrrow}" + constraints="${parentnodetype}.number=${parentnodenr} and ${searchtype}.number=${nodenrrow} ${empty constraints ? '' : 'AND'} ${constraints}" fields="${relationrole}.number" > <c:set var="link" scope="request"><mm:field name="${relationrole}.number" /></c:set> <mm:log>node ${nodenrrow} has a relation to parent ${parentnodenr}</mm:log> @@ -220,6 +221,7 @@ <mm:param name="actions[createRelation][${nodenrrow}].role" value="${relationrole}" /> <mm:param name="actions[createRelation][${nodenrrow}].sortPosition" value="end" /> + <mm:param name="actions[createRelation][${nodenrrow}].relationValues" value="${constraints}" /> <c:if test="${not empty flushname}"> <mm:param name="flushname" value="${flushname}" /> </c:if> Modified: mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/related/add.tag =================================================================== --- mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/related/add.tag 2009-12-03 13:47:59 UTC (rev 40104) +++ mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/related/add.tag 2009-12-03 13:55:15 UTC (rev 40105) @@ -3,6 +3,7 @@ <%@ taglib prefix="util" tagdir="/WEB-INF/tags/vpro-wizards/util" %> <%@ attribute name="relationrole" %> +<%@ attribute name="relationValues" %> <%@ attribute name="multipart" type="java.lang.Boolean" description="don't set this if you use a fielfield in the body. In that case it's the default" %> <%@ attribute name="sortfield" description="this is the field in the relation that a sorting value will be inserted in. (like posrel.pos, although for posrel this field is set by default)" %> <%@ attribute name="sortposition" description="[begin|end] where to insert the new relation in the sorted list of existing relations (between given source and new node). defaults to 'end'" %> @@ -41,7 +42,7 @@ <c:set var="enctype"><c:if test="${multipart == true || not empty requestScope.filefield}">enctype="multipart/form-data"</c:if></c:set> <c:remove var="requestScope.filefield" /> <form action="${pageContext.request.contextPath}/wizard/post" method="post" id="formcontainer" ${enctype}> - <related:createrelation referDestination="new" source="${param.nodenr}" role="${relationrole}" sortfield="${sortfield}" sortposition="${sortposition}"/> + <related:createrelation referDestination="new" source="${param.nodenr}" role="${relationrole}" sortfield="${sortfield}" sortposition="${sortposition}" relationValues="${relationValues}" /> <util:flushname/> <c:if test="${not empty flushname}"> <input type="hidden" name="flushname" value="${flushname}" /> @@ -70,4 +71,4 @@ </c:if> --%> </div> -</div> \ No newline at end of file +</div> Modified: mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/related/createrelation.tag =================================================================== --- mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/related/createrelation.tag 2009-12-03 13:47:59 UTC (rev 40104) +++ mmbase/trunk/applications/vpro-wizards/src/main/webapp/WEB-INF/tags/vpro-wizards/related/createrelation.tag 2009-12-03 13:55:15 UTC (rev 40105) @@ -10,6 +10,7 @@ <%@ attribute name="referDestination" %> <%@ attribute name="destination" %> <%@ attribute name="role" %> +<%@ attribute name="relationValues" %> <%@ attribute name="sortfield" description="this is the field in the relation that a sorting value will be inserted in. (like posrel.pos, although for posrel this field is set by default)" %> <%@ attribute name="sortposition" description="[begin|end] where to insert the new relation in the sorted list of existing relations (between given source and destination). defaults to 'end'" %> @@ -31,3 +32,6 @@ <c:if test="${not empty role}"> <input type="hidden" name="actions[createRelation][${relationid}].role" value="${role}" /> </c:if> +<c:if test="${not empty constraints}"> + <input type="hidden" name="actions[createRelation][${relationid}].relationValues" value="${relationValues}" /> +</c:if> _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs