commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shah, Shrihas (OFT)" <Shrihas.S...@oft.state.ny.us>
Subject RE: [BeanUtils] Mapped properties, this maybe a bug?
Date Mon, 20 Oct 2003 16:40:28 GMT
Hi Anthony:

You need 

Public Map getXXX(String key) method signature.

Also you will need 

Public void setXXX(String key, String value) 
method


Similarly you need to change your jsp too. Where you will pass in the
key.

Hopefully it will solve the problem.

Shrihas Shah
NYS Office for Technology
shrihas.shah@oft.state.ny.us
Phone (518) 408-2382
Fax (518) 473-3389
(US Postal Service Regular Mail Address)
State Capitol ESP, PO Box 2062
Albany, NY 12220-0062
(Parcel Post/Overnight and Interagency Mail Address)
Empire State Plaza
Swan St., Core 4, 1st Floor
Albany, NY 12223

-----Original Message-----
From: Anthony.Mutiso@aeso.ca [mailto:Anthony.Mutiso@aeso.ca] 
Sent: Monday, October 20, 2003 10:40 AM
To: commons-user@jakarta.apache.org
Subject: [BeanUtils] Mapped properties, this maybe a bug?

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.
 
To work around this issue I had to rename my getXXX() method to
something
else to until I get this problem sorted out.
 
So why does this not work as expected? Are my expectations wrong?
 
Thanks
 
Anthony
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message