Bill Siggelkow wrote:

Michael, for a map-backed property to work with the property="value(key)" syntax the key must be defined as a String; the methods must follow the pattern:

public Object getFoo(String key) {…}
public void setFoo(String key, Object value) {…}

Try that out and let me know if it works for you.

Bill Siggelkow

Michael McGrady wrote:

I am using the following in an action form:



 public void setMap(Map map) {
   this.map = map;
 }

 public Map getMap() {
   return map;
 }

 public void setValue(Object key, Object value) {
   map.put(key,value);
 }

 public Object getValue(Object key) {
   return map.get(key);
 }


Yet, when I put setValue("test","TEST") into the session, I get the following exception from the attempted use of <html:bean name="formName" property="value(test)"/>:


  "No getter method for property value(test) of bean formName"

This is quite a surprise. Anyone know what is going wrong here? Sometimes the simplest things go wrong?

Michael



Rick Reumann correctly pointed out that I just need to use map.test rather than value(test). Thanks.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to