struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McGrady <m...@michaelmcgrady.com>
Subject RE: logic:iterate question
Date Fri, 06 Feb 2004 23:29:11 GMT

>
>I don't think you can pass parameters in JSTL, at least not yet.  But
>you could, in your action, call getModelList passing the String you got
>from the request, and then when you forward to the JSP, iterate over
>that Collection.

I am not sure what you meant, Wendy, but, in case you meant that you cannot 
use parameters, then check out: 
http://jakarta.apache.org/struts/faqs/indexedpropers.html .

If this is helpful, I use this with a BeanMap I whipped up:

public final class BeanMap
     implements Map {
   private Map map;
   private BeanMap() {
   }
   public static Map getInstance(Map map) {
     BeanMap bean = new BeanMap();
     bean.setMap(map);
     return bean;
   }
   public void setMap(Map map) {
     this.map = map;
     log.info(this.map);
   }
   public void setValue(Object key, Object value) {
     map.put(key,value);
   }
   public Object getValue(Object key) {
     return map.get(key);
   }
   // Forwarding, composition, methods
   public void       clear()                       { map.clear(); }
   public boolean    containsKey(Object key)       { return 
map.containsKey(key);}
   public boolean    containsValue(Object value)   { return 
map.containsValue(value); }
   public Set        entrySet()                    { return map.entrySet(); }
   public boolean    equals(Object object)         { return 
map.equals(object); }
   public Object     get(Object key)               { return map.get(key); }
   public int        hashCode()                    { return map.hashCode(); }
   public boolean    isEmpty()                     { return map.isEmpty(); }
   public Set        keySet()                      { return map.keySet(); }
   public Object     put(Object key, Object value) { return 
map.put(key,value); }
   public void       putAll(Map map)               { map.putAll(map); }
   public Object     remove(Object key)            { return map.remove(key); }
   public int        size()                        { return map.size(); }
   public Collection values()                      { return map.values(); }
   public String     toString()                    { return map.toString(); }
}///;-)
Bye 'd bye,

Michael







Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message