protected static MessageContainer getMessageContainer ( final WComponent component ) { for ( WComponent c = component ; c != null ; c = c . getParent ( ) ) { if ( c instanceof MessageContainer ) { return ( MessageContainer ) c ; } } return null ; }
Searches the WComponent tree of the given component for an ancestor that implements the MessageContainer interface .