Re: basic struts question using a Map in an ActionForm

2005-07-18 Thread Craig McClanahan
On 7/18/05, Rick Reumann <[EMAIL PROTECTED]> wrote: > To me, this is very confusing. Why doesn't the html:property tag perform > the same kind of logic as JSTL does? I would think I should be able to > just do... > > > > and not need to create a new accessor method name and the odd syntax (x) ?

Re: basic struts question using a Map in an ActionForm

2005-07-18 Thread Rick Reumann
Rick Reumann wrote the following on 7/14/2005 4:26 PM: Rick Reumann wrote the following on 7/14/2005 4:20 PM: From the FAQ I'm going to try this in my ActionForm.. public Object getStringMapped(String key) { return map.get(key); } public void setStringMapped(String key, Obj

Re: basic struts question using a Map in an ActionForm

2005-07-15 Thread Dakota Jack
Right as rain, Rick! You also can have a getMap() method and use map.name rather than map[1].name. There is some fairly weird code, unfortunately, underlying all this, which makes the creation of an ActionForm as an instrumented Map impossible. However, looking at the code itself is very instruc

Re: basic struts question using a Map in an ActionForm

2005-07-14 Thread Rick Reumann
Rick Reumann wrote the following on 7/14/2005 4:20 PM: From the FAQ I'm going to try this in my ActionForm.. public Object getStringMapped(String key) { return map.get(key); } public void setStringMapped(String key, Object value) { map.put(key, value); } When i

Re: basic struts question using a Map in an ActionForm

2005-07-14 Thread Rick Reumann
Rick Reumann wrote the following on 7/14/2005 3:17 PM: Ok this is basic, but I'm stumped here at the moment... Imagine a Map of Animals. (Animal has a "name" property) map.put(new Integer(1), new Animal() ); map.put(new Integer(2), new Animal() ); In my Action form this map is in there as: pr