From: "Christian Sell" <[EMAIL PROTECTED]> > I did not want to derive my taglib from BeanTagLibrary, because: > > 1) I dont like to be closely coupled to an external library, which only > supplies optional features that are not at the core of my lib. > > 2) the above can also be rephrased as a OO design aspect. My library "is > not a BeanTagLibrary". It has a completely different purpose. For > example, by inheriting from BeanTagLibrary, it would suddenly support > the "beandef" tag, which is completely alien to its function.
It'd be trivial to refactor the BeanTagLibrary class to make this optional or refactor the common code into an abstract base class or something. i.e. have a well defined extension point from which you can derive. > after all, inheritance is only available once, and therefore should be > used with caution.. OK I understand. So I'd say your choices are * write your own tag library handling the mapping of tags -> beans and properties however you wish with whatever code you wish. * we could refactor BeanTagLibrary to make the things you don't want optional (or move the reusable stuff to a base class etc). In particular it'd be good if you could reuse UseBeanTag (from core) or BeanTag together with BeanProperty tag. * take a look at the betwixt tag library and see if thats more suitable to your needs. James ------- http://radio.weblogs.com/0112098/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
