Carsten Ziegeler wrote:
Ralph Goers wrote:
Item item = getParent().getParent();
if (item == null || !(item instanceof NamedItem)) {
this.label = this.name;
} else {
this.label = item.getLabel() + "." + this.name;
}
I would create a setLabel method to NamedItem (probably protected or
even private) and then have setName() call it.
Ok, sounds good to me - I'll change that today. Don't we need a loop in
the code you provided above? For example if there sub tabs are not
directly nested inside the main tab?
I don't believe a loop is required. Castor is creating each of the
NamedItems and so it provides the "looping".
Ralph