Page 1 of 1

why so many static accessors on BroadleafManageCustomerAddre

Posted: Mon Jul 22, 2013 9:13 pm
by pokemon007
I try to subclass controllers from some of the controllers to provide mobile version of pages. For instance, I want to subclass MobileManageCustomerAddressesController from BroadleafManageCustomerAddressesController. As most backend data modules can be kept the same, the only thing to be done is return different view.

The problem, however, is some of the classes have static accessors. MobileManageCustomerAddressesController is one of them that have all static accessors of the views. If I want to call super.addCustomerAddress, I need to map the returned view from super to the corresponding view of mobile version. Some method can have several returns, then subclass has to map them all. To make matter worse, the future version of super may change. This is nightmare! Is this design flaw or there is a reason behind this? Please explain.

Thanks.

-Charlie