We are using DWR 2.0.5 with annotations.
We have an abstract class A annotated with @DataTransferObject
and a class B which extends A also annotated with @DataTransferObject.
The @RemoteProperty is set on the attributes of both classes.
(Our modelization tool forces us to put this annotation on properties instead of methods).
Looking at the AnnotationsConfigurator, we see that the fields are taken from:
not from the superclass.
So, we tried to hack this in order to take the fields of the super class:
and it works.
Is there another proper way to configure DWR annotations with inheritance without doing a hack like this?
1) I am not sure doing this is correct, let me think about it.
2) Yes, actually I think you have it mixed up. getFields is not necessary but getDeclaredFields certainly is. getFields only returns public fields.
Gilles, you don't mention it in your description but a key part of this is that the field in the abstract (super class) has to be private in order to see this - if it is public everything works fine.
You should look at the Java Doc for the reflection APIs we are using and you will see why calling getDeclaredFields is necessary.
I don't think your request for the Enum change is valid.
I am considering this issue resolved.
You mentioned this bug will be patched in version 2.0.11 but from your documentation this version does not exist.
Did you fix this bug.
Thanks a lot
Ok thx, let me know when you'll had time to release this version.