[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Modification of UI Beans in Custom Projects  XML
Forum Index -> Development
Author Message
bthalheim

Power User

Joined: 05/04/2012 11:45:24
Messages: 72
Offline

Hi,

we have a product line software with an eclipse project for the basic project, called "product" and so called "projects" for customer-specific adaptations.

Assum in the "product" contains a JSP plus a corresponding UI Bean which defines some complete reasonable behaviour. Now a customer demands some adapted behaviour for his "project".

Intuitively, we'd simply like to subclass the UI Bean and use the specialized "project" UI bean for that customer.

Is that possible? If you had two Classes with the same CCGenClass-Annotation, how can I persuade CaptainCasa to use the more special one?
Are my explainations understandable at all?

Regards,

Björn


PS: Of course, variable behaviour can be always put out of the UI Beans themselves into delegates. Spring would enable me to achieve this variability in behaviour by default- and special- implementations of the Delegate. So the question is more, if the DataBinding/CCGenClass-Thing allows that to be done at a different level. I can imagine, that this is not possible at all.
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,

of course there are certain issues involved... ;-)

First: The annotation "CCGenClass" is used for editor purpose only. So no problem to have a customer extension also pointing to the same expression-base that is used by your class.

The question is who is the one to play the role of the factory...: there are certain situations:
If it is a bean running inside a dispatcher, then you need to adapt the dispatcher accordingly, so that you first select the customer class and then the own one.
If it is a page bean that is created from another bean, then you need to replace the new-operator by some smarted FActory-mechanism.

Last but no least: if the customer wants to extends the JSP as well (add some fields or whatever) then you can dynamically access, by implementing an IDynamicPageProvider. This is an interface to load a JSP file by program - so you can first e.g. check for the JSP within a directory "/customerModifications" before accessing the normal JSP-location.


Regards, Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team