Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/taglib
In directory james.mmbase.org:/tmp/cvs-serv21643/nl/didactor/taglib

Modified Files:
        HasroleTag.java MayTag.java 
Log Message:



See also: 
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/java/nl/didactor/taglib


Index: HasroleTag.java
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/core/java/nl/didactor/taglib/HasroleTag.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- HasroleTag.java     27 Jul 2007 14:34:15 -0000      1.8
+++ HasroleTag.java     1 Feb 2008 14:13:01 -0000       1.9
@@ -21,7 +21,7 @@
 /**
  * HasroleTag: retrieve a setting for a component
  * @author Johannes Verelst <[EMAIL PROTECTED]>
- * @version $Id: HasroleTag.java,v 1.8 2007/07/27 14:34:15 michiel Exp $
+ * @version $Id: HasroleTag.java,v 1.9 2008/02/01 14:13:01 michiel Exp $
  */
 public class HasroleTag extends CloudReferrerTag {
     private final static Logger log = 
Logging.getLoggerInstance(HasroleTag.class);
@@ -48,8 +48,6 @@
         this.inverse = inverse;
     }
     /**
-     * Set the value for the 'inverse' argument of the Hasrole tag
-     * @param inverse whether or not we need to inverse the result
      */
 
     public void setReferid(String referid) {
@@ -97,6 +95,10 @@
             throw new JspTagException("User with number '" + number + "' not 
found");
         }
         // Get Education no
+
+        /// WTF you must specifiy the _name_ of the variable there?
+        // Would simply a node number not be much more convenient?
+
        int educationno= 0;
        String educationStr = education;
        if ((educationStr == null) || "".equals( educationStr) ) {
@@ -104,7 +106,7 @@
            educationStr= "education";
        }
        // obtain education via context
-       Object in_education= 
getContextProvider().getContextContainer().get(educationStr);
+       Object in_education= 
pageContext.getRequest().getAttribute(educationStr);
        if (in_education != null) {
            if (in_education instanceof Integer) {
                educationno= ((Integer) in_education).intValue();


Index: MayTag.java
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/core/java/nl/didactor/taglib/MayTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- MayTag.java 21 Jan 2008 18:32:46 -0000      1.5
+++ MayTag.java 1 Feb 2008 14:13:01 -0000       1.6
@@ -79,7 +79,9 @@
         Parameters params = a.createParameters();
         fillStandardParameters(params);
         DidactorHelper.fillStandardParameters(this, params);
-        for (Map.Entry entry : ((Collection<Map.Entry>) 
Referids.getReferids(referids, this).entrySet())) {
+
+        Map m = Referids.getReferids(referids, this);
+        for (Map.Entry entry : ((Collection<Map.Entry>) m.entrySet())) {
             String key = (String) entry.getKey();
             params.set(key, entry.getValue());
         }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to