You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Henri Yandell <ba...@generationjava.com> on 2003/12/17 09:31:58 UTC
[beanutils] indexed vs mapped vs simple bug?
Is there a known bug in that beanutils hides properties when there are
multiple ways of accessing them? Or is this against the bean spec?
ie) an indexed property, and a simple property that changes the underyling
List:
public ArrayList getCertifications() {
return certifications;
}
public void setCertifications(ArrayList newCertifications) {
this.certifications = newCertifications;
}
public String getCertifications(int index) {
return (String)certifications.get(index);
}
public void setCertifications(int index, String value) {
certifications.set(index, value);
}
It seems that PropertyUtilsBean [getPropertyDescriptor()] will act so that
a mapped value takes precedence over an indexed value over a simple value.
So exceptions are thrown if you try to use beanutils to access the simple
value 'certifications' above.
[Bugzilla took Safari out, so I chose to ask here instead]
Hen
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org