code: 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;
  	}
docs: Searches the WComponent tree of the given component for an ancestor that implements the MessageContainer
  interface.
  
  @param component the component to return the Container for
  @return the nearest MessageContainer if found, null otherwise