In my last post I showed you the composite component collapsiblePanel. In my final remark I mentioned that this component has a major design flaw. The logic for collapsing and expanding the content must be supplied by the user and is not part of the component. In this post I show you how this problem can be solved.
Every now and then parts of a composite component’s intended behaviour can only be implemented with Java code. Just like our logic for collapsing and expanding the panel. What we need is an extension point to integrate this code into a composite component. As composite components are internally built with a set of classical components the most obvious idea is to use a component for this purpose.
Continue reading →