> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Hi Folks, > > Before I post I bug report I want to see the problem I face > is really a bug. > > I have a struts application that uses a Mapped (Map) property > for one of the > form bean's property. > > If in the form bean I provide : > public Object getXXX(String key) > public void setXXX(String, key, Object value) > > mapped bean methods all works as it should. Both setting and > getting values > work as expected when accessing the property e.g > myform.XXX(key1) or setting > it. > > If I add a the following method: > public Map getXXX() > > then my setter methods no longer work. After cranking up the > Log4J error > level I see that beanutils thinks that there are no setter > messages and that > the property is read-only.
Properties are not "polymorphic". A property is either a mapped property, an indexed property, or a "scalar" property (I'm sure there's a better, more correct term for this). It can only be one of those. If you need to access data as a mapped property, and also access the map directly, then you'll have to use two different property names, as you've discovered. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
