Custom Breadcrumb Component


I want to implement a simple breadcrumb component that takes a HierarchicalContainer and provides the possibility to set a certain value selected, listen to clicks on the crumbs, etc.

From my point of view this could be a simple HorizontalLayout containing several Buttons (styled accordingly).

Now usually you would use CustomComponent to create your own Component, but then I would need to implement all the stuff regarding the container (setting the source, implementing the listeners, the caption generation) etc.

I have seen that AbstractSelect has exactly the base that would be needed.

The only Problem is, I would need to override paintContent() to paint the breadcrumbs. Is there a way I can construct the crumbs using serverside components and pass the result to the PaintTarget?

Or what would be the way to go here?

Thank you!