sdc
12-09-2008, 09:23 AM
I really love Java Bean support, especially the solution with the @BEAN annotation. It is awesome that we can use a POJO which doesn't implement ModelData or anything else from GXT and that we don't have to manage the get/set properties stuff.
However, we still have to create an interface extending BeanModelMarker and then annotating it with our bean class (e.g. @BEAN(Customer.class) public interface CustomerBeanModel...). This way we don't have to modify our bean class but I'm not really happy to create a new interface for each bean class... Making my beans implementing BeanModelTag instead of creating a new interface is also not an alternative for me.
It would be really nice if we were able to put the @BEAN annotation directly on the bean class. The modification on the bean class would be really minor and an annotation is a weak dependency. The use of java bean support would be easier and quicker (and it would avoid a lot of empty interfaces).
However, we still have to create an interface extending BeanModelMarker and then annotating it with our bean class (e.g. @BEAN(Customer.class) public interface CustomerBeanModel...). This way we don't have to modify our bean class but I'm not really happy to create a new interface for each bean class... Making my beans implementing BeanModelTag instead of creating a new interface is also not an alternative for me.
It would be really nice if we were able to put the @BEAN annotation directly on the bean class. The modification on the bean class would be really minor and an annotation is a weak dependency. The use of java bean support would be easier and quicker (and it would avoid a lot of empty interfaces).