Update of
/var/cvs/contributions/didactor2/src/education/java/nl/didactor/education
In directory
james.mmbase.org:/tmp/cvs-serv14970/education/java/nl/didactor/education
Modified Files:
Functions.java
Log Message:
added some functions to make jsps simpler
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/education/java/nl/didactor/education
Index: Functions.java
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/education/java/nl/didactor/education/Functions.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- Functions.java 18 Jul 2008 13:43:00 -0000 1.5
+++ Functions.java 20 Nov 2008 15:09:40 -0000 1.6
@@ -9,7 +9,7 @@
/**
* Several functions on mmbase nodes which are used by didactor.
* @author Michiel Meeuwissen
- * @version $Id: Functions.java,v 1.5 2008/07/18 13:43:00 michiel Exp $
+ * @version $Id: Functions.java,v 1.6 2008/11/20 15:09:40 michiel Exp $
*/
public class Functions {
protected final static Logger log =
Logging.getLoggerInstance(Functions.class);
@@ -68,4 +68,21 @@
}
+ /**
+ * Attach the made test object to the nearest object which' node manager
has the
+ * 'madetestholder' property.
+ */
+ public Node madetestholder() {
+ Cloud cloud = node.getCloud();
+ for (int n : path()) {
+ Node node = cloud.getNode(n);
+ NodeManager nm = node.getNodeManager();
+ if ("true".equals(nm.getProperty("madetestholder"))) {
+ return node;
+ }
+ }
+ return null;
+ }
+
+
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs