code: public static WMessages getInstance(final WComponent component) {
  		MessageContainer container = getMessageContainer(component);
  		WMessages messages = container != null ? container.getMessages() : null;
  
  		if (messages == null) {
  			messages = new WMessagesProxy(component);
  		}
  
  		return messages;
  	}
docs: Retrieves the WMessages instance for the given component. The component tree is searched for an ancestor that
  implements the MessageContainer interface. If not found, a proxy is returned that searches for the
  MessageContainer each time a WMessages method is called. This allows developers to obtain a valid "instance"
  during e.g. constructors, where the component will not have been added to the tree yet.
  
  @param component the component to retrieve the WMessages instance for
  @return the WMessages instance for the given component.